[COLUG] shell scripting question
Jim P
jep200404 at columbus.rr.com
Wed Apr 7 13:47:32 EDT 2004
Jess Balint <dollzerr at iwaynet.net> wrote:
> I'm surprised nobody mentioned xargs. It's reduces all this stuff to
> just a single pipe:
>
> ls -tr | xargs echo
xargs doesn't address the issue that Tom was asking about,
which was about the spaces in filenames being treated as
delimiters for arguments.
I.e., with a filename like "Peter Gabriel - solsbury hill.mp3",
try
ls -tr | xargs ls
then try
ls -tr --quoting-style=shell | xargs ls
Citing echo, hides the problem.
More information about the colug
mailing list