Commands like sed, grep, tr, etc are buffered. This is just how they are written. If you check the man pages for them, you might find they have an unbuffered mode. I'm not on a Solaris box at the moment but I know that the Linux implementation of sed has a -u option for unbuffered processing. I have never seen an unbuffered version of tr. For grep, look for --line-buffered. This is less likely to be on the native Solaris grep but then anything you can do with grep you can do with sed.
Main Topics
Browse All Topics





by: ozoPosted on 2007-08-31 at 01:41:33ID: 19806696
do_countdown | perl -pe 'BEGIN{open T,">",shift or die $!;$"=1}tr[a-z][A-Z]; print T' $COUNT_OUTPUT