On 7/19/07, Mikkel L. Ellertson <mikkel@xxxxxxxxxxxxxxxx> wrote: > Valent Turkovic wrote: > > I get an error when trying to start this script: > > > > ./gaim-start.sh > > ./gaim-start.sh: line 5: script-file=~/gaim-start.sh: No such file or > > directory > > ./gaim-start.sh: line 20: $script: ambiguous redirect > > > > I tried to edit line 5 and change "script-file" to "$script-file" and > > that also didn't work so I tried changing it to "$script" and it still > > doesn't work... > > > > I don't know enough bash to troubleshoot it. > > > > Thank you for your feedback and help Mikkel. > > > > Valent. > > > Please do not top post! > > I should have tested the script. It does not like script-file, so > replace it with script_file. In line 20, there is a typo - it should > be $script_file instead of $script file. ($script-file with the > original value.) > > Mikkel > -- > > A: Because it messes up the order in which people normally read text. > Q: Why is top-posting a bad thing? > Hi Mikkel, I found a few other bugs and corrected the script - but I couldn't have done it without you - so thank you. The script was a non-executable and "export" was missing so this is the final version of the script: ================== cut =============== $ cat gaim-start.sh #!/bin/bash # # A script to create a script to run GAIM at 8:15 am. # script_file=~/start-gaim.sh if [ -z $XAUTHORITY ] ; then echo XAUTHORITY in not set! exit 1 fi if [ -z $DISPLAY ] ; then echo DISPLAY is not set! exit 1 fi echo \#\!/bin/bash > $script_file echo export XAUTHORITY=$XAUTHORITY >> $script_file echo export DISPLAY=$DISPLAY >> $script_file echo gaim >> $script_file chmod +x $script_file at -f $script_file 8:15 am ================== cut =============== -- http://kernelreloaded.blog385.com/ linux, blog, anime, spirituality, windsurf, wireless registered as user #367004 with the Linux Counter, http://counter.li.org. ICQ: 2125241, Skype: valent.turkovic