2009-04-30, 10:07 PM
trummel Wrote:The key there is the semicolon. It tells the linux shell that what follows is a new command. you could probably do this:-
if [ -f /etc/mvpmc/mvpmcx2 ];then;...;else;...;fi
although I wouldn't recommend it.
I use a similiar thing all of the time to test changes to my iptables firewall on a remote system. If I cock up, it only locks me out for 10 seconds.
service iptables start; sleep 10; service iptables stop
I understand that - I wrote it that way because I'm used to Korn shell. Wasn't sure if it would work in the PCH shell (wasn't sure if it was bash or csh), but it did, so I left it.
If people are having problems with the "then" on a new line from the "if", then it wouldn't work w/ the semi either.
Are folks sure the if/then statement is the problem?
GBPVR v1.4.7
Windows 7 Ultimate (64-bit)
Intel Core 2 Duo 2.33 GHz
4 GB RAM, 160GB system drive
640GB recording drive
PVR-500 - analog cable stations
HDHomeRun - ASTC via antenna
nVidia GeForce 8600GT
1 PCH @ 1080p componenent (was NTSC via composite)
1 PCH @ 1080p HDMI (was component)
Windows 7 Ultimate (64-bit)
Intel Core 2 Duo 2.33 GHz
4 GB RAM, 160GB system drive
640GB recording drive
PVR-500 - analog cable stations
HDHomeRun - ASTC via antenna
nVidia GeForce 8600GT
1 PCH @ 1080p componenent (was NTSC via composite)
1 PCH @ 1080p HDMI (was component)