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

Popular posts from this blog

Change php variable from jquery value using ajax (same page) -

Pull out data related to my apps from Android Play Store and iOS App Store -

How can I fetch data from a web server in an android application? -