When I run for i in $(find -name '*.ogg'); do echo '$i'; done I don't get one line per file as I expected. Instead, when a file name has a space in it, each word comes out in a separate line, so I can't run commands on the files.
Tell me more
×
Super User is a question and answer site for
computer enthusiasts and power users. It's 100% free, no registration required.
|
|
|||
|
|
|
|||||||
|
|
Here is an example of maybe what you want to do:
I.E: Change the IFS (Inter Field Seperator) to \n instead of space,tab,\n |
|||
|
|
|
You should pipe
Also, the single quotes you had around Another way is to use process substitution:
which has the advantage of not creating a subshell out of the |
|||
|
|
|
If you want to run the command in parallel and if have GNU Parallel http:// www.gnu.org/software/parallel/ installed you can do this:
Watch the intro video for GNU Parallel to learn more: http://www.youtube.com/watch?v=OpaiGYxkSuQ |
|||
|
|