↧
Answer by J G Miller for Prevent parameter expansion in shell script
You need to familiarize yourself with the basic rules concerning shell expansion of variables. NAME="start" IF you present $NAME to the shell it will be exanded to the string start If you put single...
View ArticleAnswer by Oli for Prevent parameter expansion in shell script
I've demonstrated the problem here: $ pie() { echo $1; }; pie '*' 1 2 3 4 5 file Expanded. Bother. But the solution is quite simple. You just need to quote it but in a way that bash will understand. We...
View ArticlePrevent parameter expansion in shell script
I often have to do a recursive search in files. Tired of typing the whole "find/grep" combination all the time, I just created a script with the following line: find . -name $1 -exec grep $2 {} +...
View Article