Re: Changing the behaviour of ls, possibly via a script

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxx 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@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/blinux-list



_______________________________________________

Blinux-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/blinux-list

[Index of Archives]     [Linux Speakup]     [Fedora]     [Linux Kernel]     [Yosemite News]     [Big List of Linux Books]