NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.
Support Forum » LEDArray - Bash question
March 08, 2010 by gplouffe |
I am struggling with bash syntax and was hoping someone could help me sort it out. The following was working but I made some changes to the date format and (rookie move) did not have a backup. Now I am getting a syntax error on a line that worked fine before. Here is the script. Pretty simple but this generates a syntax error noted below: !/bin/bash TWHEADER=' FOLLOW US ON TWITTER @ ' CURRENTDATE=$(date +%m%d%Y) lcdtext="/home/fit/twitter/lcd.txt" tweets=$(twidge lsrecent -su )
if [[ -n "$tweets" ]] ; then tweets=$( echo "$tweets" | tr '[:lower:]' '[:upper:]' ) echo $tweets > $lcdtext else echo "no tweets" fi The error I am getting is as follows: File "gettweet.sh", line 11 CURRENTDATE=$(date +%m%d%Y) ^ SyntaxError: invalid syntax |
---|---|
March 08, 2010 by gplouffe |
Apparently I need to take a break.... Working fine now. Had a problem between the keyboard and the floor...was executing as a python script vs a bash script...yeesh |
March 10, 2010 by mcai8sh4 |
just as a comment, you need a hash at the beginning, ie.
-Steve |
Please log in to post a reply.
Did you know that any circuit of voltage sources and resistors can be simplified to a "Thevenin" equivalent circuit? Learn more...
|