The aim of the below script is for it to read in the 'waketime.txt' file (which contains a time) and then schedule the pc in question to be woken via magic packet and the wakelan -m command.
When i run the below script, instead of the 'wakelan' line just being scheduled via at, it is actually run as well.. consequently waking the pc in question instead of just scheduling it. Does anyone have any ideas? and what's the go with the different quotation marks (' and " and `) in bash scripting? can someone explain these as well please?
#!/bin/bash filename=/.../waketime.txt if [ -f "$filename" ] then echo "$filename exists" for JOB in `atq | cut -f 1` ; do atrm $JOB; done wakelan -m mymac_address | at `cat /.../waketime.txt | cut --bytes=1-5` else echo "$filename does not exist" exit 0 fi
Im sure this is probably an easy one for you seasoned bash scripters, but it's only about my 3rd attempt to make a script for bash.. so any help would be greatly appreciated
Thanks a bunch.