In the last episode, we heard [EMAIL PROTECTED] say:
> I have a small script that pings my ISP every so often so the ISP 
> doesn't shut my server connection down for lack of activity. The script 
> is as follows
> 
> #!/bin/sh
> ping -i 600 wvi.com>/tmp/pinglog.txt
> 
> On my desktop I have set up an icon to start the script called pingit. 
> The execute line is
> 
>  /root/pingit &.

Lose the period, if it's there. I don't think it is necessary to run
it in the background, either. Moreover, you need to do something with
stderr:

ping -i 600 wvi.com > /tmp/pinglog.txt 2> /tmp/pingerr.txt

The other problem is that ping must run in a terminal, so create the
shortcut to run in a terminal (I believe there's a checkbox for this
purpose).

> !pingit &

What's with the "!"?

> I get an error msg that has to do with the '&'
> 
> If I try to run it with just !pingit, it says that there is no such command.

Right. The script is named "pingit" not "!pingit". Try:

./pingit

The shell has a special meaning for "!".

Kurt
-- 
QOTD:
         "It's not the despair... I can stand the despair.  It's the hope."
_______________________________________________
http://linux.nf -- [EMAIL PROTECTED]
Archives, Subscribe, Unsubscribe, Digest, Etc 
->http://linux.nf/mailman/listinfo/linux-users

Reply via email to