Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: iterating through a hierarchy with a filter



I have the filter given as a parameter to my script, invoked as suggested,

$filter < $file1 > $file2

If I give a single existing script as a parameter, it works fine. If, however, I give it

walk 'iconv -f utf8 -t cp1251' srcdir tgtdir ...

-- I get "command not found" for 'iconv -f utf8 -t cp1251' at the line above. Since the walk script starts with
#/bin/zsh
filter=$1

I wonder what kind of quoting happens and how to "dequote" it so the command line will look indeed like

iconv -f utf8 -t cp1251 < $file1 > $file2

E.g., doing filter="$1" doesn't change it.
Cheers,
Alexy



Messages sorted by: Reverse Date, Date, Thread, Author