The UNIX and Linux Forums
>
Top Forums
>
Shell Programming and Scripting
ksh: cmd output to input of another script
.
User Name
Remember Me?
Password
google unix.com
Forums
Register
Forum Rules
Links
Albums
FAQ
Members List
Calendar
Search
Today's Posts
Mark Forums Read
Thread
:
ksh: cmd output to input of another script
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
#
2
(
permalink
)
04-27-2008
era
Herder of Useless Cats (On Sabbatical)
Join Date: Mar 2008
Location: /there/is/only/bin/sh
Posts: 3,652
Code:
ping -c 1 otherhost | while read inpt; do date +"%I:%M:%S %p <-> $input" done
The -c 1 restricts this to one ping packet; if you want it to keep going, then certainly, just take out the "-c 1".
era
View Public Profile
Visit era's homepage!
Find all posts by era
Find era's past nominations received
Find era's present nominations given