cat -v and ls -C considered harmful

Ed Nather nather at utastro.UUCP
Sat Aug 10 03:40:24 AEST 1985


> 	However,
> 
> 		ls -C /usr/src/cmd/*.c
> 
> 	doesn't really do the optimal thing, either.  On a DEC or
> 	other system where file-name expansion is done in the program,
> 	rather than in the shell, the program would know enough to say:
> 
> 		/usr/src/cmd:
> 		bar.c      bletch.c  frotz.c    mumble.c   quux.c
> 		baz.c      foo.c
> 
> 	which is the ideal format for human consumption.  Both Berkeley's
> 	and the USDL's "ls" will, instead, do
> 
> 		/usr/src/cmd/bar.c      /usr/src/cmd/frotz.c
> 		/usr/src/cmd/baz.c      /usr/src/cmd/mumble.c
> 		/usr/src/cmd/bletch.c   /usr/src/cmd/quux.c
> 		/usr/src/cmd/foo.c
> 
> 	which contains a lot of redundant information and requires more
> 	columns because of that.
> 
> 	The ideal would be a filter which did this correctly.  However,
> 	I don't have time nor much inclination to write it.
> 
> 	Guy Harris

Interesting.  The "ls" command I wrote for MS-DOS machines does it the "ideal"
way, except that the "-C" flag is not needed -- that's the default condition.
The source was posted to net.sources about a year ago.  Doesn't work on Unix
machines, though.  Sorry.
-- 
Ed Nather
Astronomy Dept, U of Texas @ Austin
{allegra,ihnp4}!{noao,ut-sally}!utastro!nather
nather%utastro.UTEXAS at ut-sally.ARPA



More information about the Comp.unix.wizards mailing list