tech-userlevel archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Moving rc.d scripts to base.tgz
On Apr 18, 2011, at 1:24 13PM, der Mouse wrote:
>>> I found that amusing, because it was just a day or two ago I added a
>>> new option to (my) ls. (I made it sort numbers numerically rather
>>> than lexicographically [...].)
>> Neat. This sounds like a job for sort(1). :-)
>
> Someone else said basically the same thing to me off-list.
>
> Perhaps. If you can tell me what command line to use to get sort(1) to
> turn the input
>
> maze3.c
> base-2-21.gif
> Makefile
> base-2-104.gif
> base-1-44.pgm
> base-1-44.gif.tmp
> maze2.c
> base-1-9.pgm+
> maze11.c
>
> into
>
> Makefile
> base-1-9.pgm+
> base-1-44.gif.tmp
> base-1-44.pgm
> base-2-21.gif
> base-2-104.gif
> maze2.c
> maze3.c
> maze11.c
>
> (which is what the new code does), I'll be interested. (Command lines
> which are dependent on the exact input, of the +0.0 -0.1 +0.5n -0.6
> +0.7n -1 ilk, need not apply.) If you can tell me how to make it do so
> and then columnize the result to
>
> Makefile base-1-44.gif.tmp base-2-71.gif maze2.c maze11.c
> base-1-9.pgm+ base-1-44.pgm base-2-104.gif maze3.c
>
> (which is a cut-and-paste copy of output from my new ls, edited only to
> provide the initial tab) I'll be _really_ interested. If you can also
> make it ignore ls -F decorations, so that "foo foo% foo+" with foo
> executable turns into "foo* foo% foo+" rather than "foo% foo* foo+",
> but if the file is named foo* and is not executable it sorts the latter
> way...
>
> ...then I'll agree there may be no need for the new code.
>
While I'm not sure this is the right solution, I agree that there's a problem.
Just this morning, I had to do a rename to insert leading zeroes into a folder
(created by others) to get this effect.
--Steve Bellovin, https://www.cs.columbia.edu/~smb
Home |
Main Index |
Thread Index |
Old Index