Hi,
ping geekcrossing.net|perl -le m/time=(\d+)/;print $1;
Can some one help me with the above command
-srini
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
On 5/16/07, Srinivainputs [EMAIL PROTECTED] wrote:
Hi,
ping geekcrossing.net|perl -le m/time=(\d+)/;print $1;
Can some one help me with the above command
Add an n to the perl arguments to get it loop over stdin and use
single quotes to prevent shell from trying to interpolate $1.
ping
Something like this:
ping geekcrossing.net | perl -nle 'print $1 if /time=(\d+\.\d+)/'
HTH
Goran
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/