in reply to yargs -- xargs but handle spaces in filenames
I have never run into a case where somebody thought it was reasonable to include a newline in a filename.
What about double quotes or backslashes? I propose the following:
#!/bin/bash perl -pe'chomp; s/$/\0/' | xargs -0 "$@"
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: yargs -- xargs but handle spaces in filenames
by ikegami (Patriarch) on Jul 13, 2009 at 18:28 UTC |