i can get my command to run from the command line, but it breaks when i put it in an sh if loop
from the command line
Code:
md5 -q /file | diff --brief /file.md5 -
(the "-" is supposed to take input from stdin)
in the script i have this
Code:
if [[ md5 -q $LOG | diff --brief $SUM - ]]; then
echo;echo "They are new!";echo
else
echo;echo "do nothing.";echo
fi
but this is the output that i get:
Code:
[[: not found
diff: extra operand
diff: Try `diff --help' for more information.
do nothing.