Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Bash Script : missing
Name: Satanic_Vegeta Date: March 13, 2009 at 16:35:28 Pacific OS: Debian Lenny Subcategory: Batch
Comment:
Hi there, I have a noob question, I dont find the bug:
[CODE] 1: #!/bin/sh 2: if [ pgrep ktorrent &> /dev/null ] ; then 3: echo "ktorrent not running... Restarting..."; 4: ktorrent; 5: exit 0; 6: else 7: pgrep ktorrent; 8: echo "ktorrent allready running!"; 9: exit 0; 10: fi if [ pgrep pidgin &> /dev/null ] ; then echo "Pidgin not running... Restarting..."; pidgin; exit 0; 15: else pgrep pidgin; echo "Pidgin allready running!"; exit 0; 19: fi [/CODE]
Brings me:
[QUOTE] :~/$ sh torrentcron.sh torrentcron.sh: 10: ]: not found [: 10: missing ] 7309 ktorrent allready running! [/QUOTE]
Summary: Hi everyone. I am a Linux scripting newbie and and was hoping to get some assistance with a bash script I am working on. I am attempting to write a bash script to determine if a user specified file is...
Summary: I'm working on a bash script so that data can by imported in a program. I worked out everything so far but I'm stuck at on last step. I need to change text in a file from: Data Set 1 Bill; fast; 726; ...
Summary: Hello! I am a newbie to scripting and I'm trying to start an application via a bash script after checking to make sure that two condititions do (or do not) exist first. I've attempted to write down w...