sh / diff syntax trouble
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 - in the script i have this Code:
if [[ md5 -q $LOG | diff --brief $SUM - ]]; then Code:
[[: not found |
well that's just not right in any way.. did you read any scripting howto's, like the bash advanced scripting howto at tldp.org? firstly [[ is not a command, the synonym for test is just [ closed with ] also wrap the string there inside the test with $(md5...SUM -) as that also totally breaks the syntax:
if [ $(md5 -q $LOG | diff --brief $SUM -) ]; no idea if what you're actually trying to evaulte will make sense within the context of a test statement though. |
All times are GMT -5. The time now is 07:35 PM. |