lawson_whitney@juno.com schrieb:
On Sun, 10 Jun 2001, Oliver Ob wrote:
I set some aliases like alias $='ls -alX', and now I am experiencing that I do not get what I wanted.
I would like the appearance of the LS output to be like under good old dos with "doscmd=/o:gen" or "dir /o:gen", that is directories sorted in a-z order FIRST, then the a-z sorted FILES. ******
Any thoughts? Why do you want this?
Simple: I want $ output sorted.
Bearing in mind that I have no freaking idea what "dir o:/gen" is spoze to look like, well i wrote just that above.... see "******"
and I don't think you can use a pipe in an alias (you'll have to make it a shell script) how is this? Put it in /usr/local/bin/duhh, say, and don't forget to make it executable.
#!/bin/sh ls -l $@ |sort -k 1.1,1.1r -k 9
If you pull it out of the mail, you might need to fromdos it first before you use it:
tr -d "\r" <dosfile >unixfile
or just use an editor to strip out any carriage returns (control-m).
Thanks, I just learned how to do sort keys. thanks too i will try that out.