Changing the behaviour of ls, possibly via a script
Jude DaShiell
jdashiel at shellworld.net
Sat Aug 14 02:11:03 UTC 2004
You could do it with awk. You'd need to write a small script and the
script could run ls for you and rearrange the fields the way you need
them. From what you write, you'd put a line to rearrange the fields in
your awk script like printf("$4 $1 $2 $3"); awkuses the $ notation
followed by numbers to specify fields. I did a little bit with awk many
moons ago. Fortunately an internet book exists that can show you lots of
stuff. If you don't get a satisfactory and functional answer here, you
might consider sed-users-subscribe at yahoogroups.com. That list handles
both sed and awk questions extensively.
On Fri, 13 Aug 2004, Lorenzo Prince wrote:
> I need to possibly make a script or in some other way change the behaviour of ls
> so that something like
>
> -rw-r--r-- 1 lorenzo lorenzo 16106 Dec 21 1997 pongmey.tet
>
> looks more like
>
> pongmey.tet -rw-r--r-- lorenzo lorenzo
>
> Is there an easy way to do this or would I have to use something like awk or sed,
> which I know little or nothing about? Would I need to completely write a program
> from scratch to do this, or does one already exist, or could this possibly be
> done through a relatively simple script?
>
> Thanks for any help,
> PRINCE
>
>
> _______________________________________________
> Blinux-list mailing list
> Blinux-list at redhat.com
> https://www.redhat.com/mailman/listinfo/blinux-list
>
More information about the Blinux-list
mailing list