![]() |
Application Rotation
2 Attachment(s)
Hello all,
I created a bourne shell script that lets me launch feh and firefox without first having a X session. I am running this script with the help of the crontab program. The sytax that I use for launching my script is: Code:
*/8 * * * * $HOME/feh_and_firefox &Please advise. :) |
I'd start by adding a default clause at the bottom so that if no previous numbers are matched, it writes some useful info to .number.
Also, add Code:
set -xvAny reason for using sh instead of bash? |
I did have something at the bottom of the script to do what you suggested but I thought that I was doing something wrong. I had something like:
Code:
if [ "$blah" -eq "" ]As for the Code:
set -xvline 1: #!/bin/sh line 2: set -xv Finally, I use bourne shell for the portability of the scripts that run on it. It is true that Bash is the defacto shell, but for my previous stated reason and personal preference. If you can think of a better Bash script then I am alllll ears! ;) Thank you for your response. |
Re set cmd: yep, just like that
Re default; don't use an if, just record what the param was and the current value in .number; in fact the entire content of .number, and put it in a separate logfile. (along with the set -xv output). Can I also recommend [[ ]] http://tldp.org/LDP/abs/html/testcon...ml#DBLBRACKETS |
| All times are GMT -5. The time now is 01:20 PM. |