bash - Shell Script Error -
can 1 tell wrong script ?. because getting error
./timer: line 9: [13: command not found ./timer: line 12: [13: command not found my script like
#!/bin/bash while : hour=$(date +%h) minute=$(date +%m) second=$(date +%s) if [$hour == 13] && [$minute == 12] && [$second == 1] ./binary elif [$hour == 18] && [$minute == 30] && [$second == 1] ./binary fi done
put space between [ ... ] example:
if [$hour == 13] && [$minute == 12] && [$second == 1] should become
if [ $hour == 13 ] && [ $minute == 12 ] && [ $second == 1 ]
Comments
Post a Comment