[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnu-arch-users] Pipes?

From: Pierce T . Wetter III
Subject: Re: [Gnu-arch-users] Pipes?
Date: Wed, 17 Mar 2004 16:13:01 -0700

For filenames with spaces, this works really well:

tla tree-lint -m --unescaped | while read line; do tla delete "$line" ; done

This delimits arguments by newline instead of spaces which seems to be
your problem, or no?

 Nope, its more complicated then that. (the above didn't work either)

escaping just got added to tla. However, it seems to be a different escaping
then that used by any of the shells.

So if the shell gets involved at any point, bad things happen. Your above example changes the \\ to a \ for instance...

 Same with xargs.

At the end of the day, since tla is doing the escaping, presumably tla will know how to undo it as well. So if the shell is kept out of the loop, then it won't have
any chance of "mucking it up". There is a similar problem with xargs...

Since tla already outputs lists of files, and already suppresses the annotation of what those files are (i.e. tree-lint and tree-lint -m have different outputs), pipes seem like a simple way around the issue. The other option would be to use a less unique escaping scheme, but that seems like a lot more work.

Any sort of while loop (and isn't xargs just another case of a while loop?) seems more complicated then a pipe anyways.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]