I wanted to get the date so I used this shell script but the variable $dayofweek is empty.. why?
Code:
#!/bin/bash
dayofweek = date | awk '{ print substr( $0, 0, 4 ) }'
exec eog /home/queenz/Documents/grdayz/$dayofweek.png &
echo /home/queenz/Documents/grdayz/$dayofweek.png
the output is...
Quote:
./startchrome.sh: line 2: dayofweek: command not found
/home/queenz/Documents/grdayz/.png
|
if I run date | awk '{ print substr( $0, 0, 4 ) }' in terminal it outputs "Fri" which is good but it doesn't work in my script...