[ILUG] displaying directory listings
P at draigBrady.com
P at draigBrady.com
Mon Jul 25 13:11:52 IST 2005
Darragh wrote:
> You wrote
>
>>I don't know the layout of your cell display.
>>How is this requirement different from 1 file name per line?
>
>
> The display is arranged in one line with 40 cells across. there are panning
> buttons across the top for moving to each block of 40 on a line. On each
> side of the display are two wheels for moving up and down a line. If I know
> there are a lot of file names on the screen but I'm looking for one starting
> with W I can read the left column until I get to the letter I'm looking for
> then I can use the panning buttons to read the other files on the line.
> basically I'm just being awkward. Its just an easier way of reading a list
> on a display. Similarly if I want to focus on the files on the right I like
> some space at the end to make it easier to distinguish where the previous
> file name ends.
Thanks for the explanation. The following shell function
which you could put in your .bashrc may be useful.
l() { cols=$1; width=`expr $cols '*' 40`; /bin/ls -F | pr -T$cols
-W$width; }
To display 1 column listing you issue "l 1" and for 4 columns "l 4"
--
Pádraig Brady - http://www.pixelbeat.org
--
More information about the ILUG
mailing list