Bit by Bit
Special characters in filenames often cause problems for shell tools. With Xargs, you can circumvent these problems.
lucadp, 123RF
Special characters in filenames often cause problems for shell tools. With Xargs, you can circumvent these problems.
Complex commands on the command line often require applying the output as input for another command. A typical example of this is the find command, which lists recursively all the parameters of corresponding files. The command in Listing 1 finds all Ogg Vorbis files in the Podcasts folder.
If you want to know whether all the files found are exclusively Ogg Vorbis files, you can use the file command, which uses a filename as a parameter. In the example shown, there are only two files, but if there were more, doing things by hand would be quite a lot of work. That is why you have backticks (` ).
The output of a command between backticks then becomes the parameter for another external command. Consider Listing 2, for example.
[...]