shell-script-pt
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [shell-script] Re: capturar tempo do ping


From: MrBiTs
Subject: Re: [shell-script] Re: capturar tempo do ping
Date: Wed, 21 May 2008 18:20:54 -0300
User-agent: Thunderbird 2.0.0.14 (Windows/20080421)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

| Funciona, mas gostaria de executar um bloco de comandos depois da
| conta, tipo:
| x=0.548; y=120; echo "$x $y" | awk '{if ($1 > $2)
| let i++
| rm -rf $arq
| /usr/local/bin/ping_up_teste.sh &
| else
| exit}'

Eu te dei a vara e te ensinei a pescar. Pegar o peixe é com você.

Você pode usar o retorno do awk no seu teste:

if ($(X=0.548; Y=120; echo "$X $Y" | awk '{if ($1 > $2) print 1}') -eq 1
; then

E ai você segue...

[]´s
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFINJI2rDdxWm3R8YYRAnP7AJ0cJZjjgeUxVUALcQa83m7MuRbRbwCcCTF8
XR8UO0SI48CZPfPhMjWhTFU=
=8+DU
-----END PGP SIGNATURE-----


reply via email to

[Prev in Thread] Current Thread [Next in Thread]