[OT] writing filters in sh

John Levine johnl at iecc.com
Thu Oct 28 20:06:54 UTC 2010


>I was hoping for a generalized, simple idiom for this, rather than
>needing to implement it myself, for demonstration purposes

----------------------------------------
#!/bin/sh

cat "$@" | 
while read x
do
   echo "I saw $x"
done
----------------------------------------

Sheesh.

R's,
John


More information about the freebsd-questions mailing list