
15 Aug
2005
15 Aug
'05
1:26 p.m.
IFS=" "; for name in `/bin/ls -1 | sort -r` ; do echo line: $name ; done
ls -l | sort -r | xargs echo
I'm not sure why the reverse was important but you can always use find's -exec option to perform actions on files with spaces in their names. [oliver] mobility:~/1$ find . -name "file*" -exec echo "'{}'" \; './file 3' './file 2' './file 1' Or if you just want a delimited filename string then this: [oliver] mobility:~/1$ find . -name "file*" -printf "'%f'\n" 'file 3' 'file 2' 'file 1' Find is your friend. Regards -- Oliver Jones <oliver(a)deeperdesign.com> Deeper Design