|
|
|
|
|
|
| Author |
Message |
Gnarlodious *nix forums beginner
Joined: 19 Feb 2005
Posts: 32
|
Posted: Tue Feb 15, 2005 5:24 pm Post subject:
Re: Get Boolean from ping
|
|
|
Entity Chris F.A. Johnson spoke thus:
| Quote: | On Tue, 15 Feb 2005 at 16:38 GMT, Gnarlodious wrote:
Is there an easy way to get a binary result from the ping command? I want a
zero or a one.
ping <args> >/dev/null && echo 0 || echo 1
(Or do you want something else?)
Nope, that'll do, thanks! |
-- Gnarlie
When you scratch a cynic you find a disappointed idealist underneath
George Carlin |
|
| Back to top |
|
 |
Chris F.A. Johnson *nix forums Guru
Joined: 20 Feb 2005
Posts: 2268
|
Posted: Tue Feb 15, 2005 3:51 pm Post subject:
Re: Get Boolean from ping
|
|
|
On Tue, 15 Feb 2005 at 16:38 GMT, Gnarlodious wrote:
| Quote: | Is there an easy way to get a binary result from the ping command? I want a
zero or a one.
|
ping <args> >/dev/null && echo 0 || echo 1
(Or do you want something else?)
--
Chris F.A. Johnson http://cfaj.freeshell.org/shell
===================================================================
My code (if any) in this post is copyright 2005, Chris F.A. Johnson
and may be copied under the terms of the GNU General Public License |
|
| Back to top |
|
 |
Gnarlodious *nix forums beginner
Joined: 19 Feb 2005
Posts: 32
|
Posted: Tue Feb 15, 2005 3:38 pm Post subject:
Get Boolean from ping
|
|
|
Is there an easy way to get a binary result from the ping command? I want a
zero or a one.
--
Cosmetic Justice; when the Botox gives you Mad Cow Disease
-- Gnarlodious |
|
| Back to top |
|
 |
Google
|
|
| Back to top |
|
 |
|
|
The time now is Fri Jan 09, 2009 1:06 am | All times are GMT
|
|
Money News | Mortgages | Fast Loans | Latest Credit Cards | Credit Cards
|
|
Copyright © 2004-2005 DeniX Solutions SRL
|
|
|
|
Other DeniX Solutions sites:
Unix/Linux blog |
electronics forum |
medicine forum |
science forum |
|
|
Privacy Policy
|
Powered by phpBB © 2001, 2005 phpBB Group
|
|