man ping Note that ping sets the return code according to what it discovers. vis: 0 machine responds; 1 machine in the DNS, but not responding; 2 unknown machine;
Also note that recent versions of ping now have lots of new, and very useful, options. and for the very best "in-depth exploration of the art of shell scripting" see:- http://www.tldp.org/LDP/abs/html/ pick the format you prefer from:- http://www.tldp.org/LDP/abs/ There are lots and _lots_ of example scripts from which you can crib ideas. Also note that there are many sites, and routers, which don't respond to, or forward, ping messages, because it can be used as an DoS attack vector. i.e. unless you have personal knowledge about the net you are testing with ping, don't rely on it. ping is one of the IP utilities in the archives:- iputils-s20071127.tar.bz2 iputils-s20071127-manpages.tar.bz2 On 4/17/08, Kerry Mayes <[EMAIL PROTECTED]> wrote: > Sorry, I wasn't clear. > > I now have a working scriptlet written in /bash that I want to include > in a script written in /sh. > > (The /sh script is one that starts as X starts "/etc/gdm/Init/Default" > - it's supposed to get synergy working before login so I can login > with a real keyboard.) > > I am trying to execute the /bash scriptlet from within the /sh script > with the line: > > /etc/gdm/Init/adds_for_Default > > It's not working quite as expected, but that could be a ssh > authentication issue. > > On 17/04/2008, John Hyde <[EMAIL PROTECTED]> wrote: > > Kerry, > > > > When you write a shell script you can specify which scripting language > you > > want in the first line of the file. > -- Sincerely etc. Christopher Sawtell
