Wednesday, 23 November 2011

Having a problem using find with command substitution

Having a problem using find with command substitution

If I do the following, I get the result that I want, with no .pk or .wav files:

find ./folder ! -iname '*.wav' -a ! -iname '*.pk'

However if I do a command substitution like so:

ls `find ./folder ! -iname '*.wav' -a ! -iname '*.pk'`

It lists the .wav and .pk files as well. What am I doing wrong?

No comments:

Post a Comment