[Gloucs] What's wrong with this code?

Glyn Davies glynd at walmore.com
Mon Jul 30 22:33:41 BST 2007


No prizes for getting the answer right as I've found it and feel free to 
spot the problem immediately and make me look a fool.

What's wrong with this line of code. Okay, other than it being a rubbish 
way of testing that your gateway is available?

if [ "$(ping -c 1 192.168.1.200 | grep '1 received')" != "" ]

P.S. I expect I'll learn of other ways in which it is 'wrong' and not 
just mine.

-- 
Best Regards
Glyn Davies



More information about the gloucs mailing list