Could someone tell me whether or not I should wrap quotes around variables in a shell script?
For example, is the following correct:
xdg-open $URL
[ $? -eq 2 ]
or
xdg-open "$URL"
[ "$?" -eq "2" ]
And if so, why?
I'm trying to run a find command for all JavaScript files, but how do I exclude a specific directory?
Here is the find code we're using.
for file in $(find . -name '*.js')
do
java -jar config/yuicompressor-2.4.2.jar --type …