script quest

From: Patricio Mora (pmora@cgob.junta-andalucia.es)
Date: Thu Jul 11 2002 - 06:08:04 EDT


I'm trying to see mount points in iostat -p instead of partitions in Solaris 2.6. The command is something like:
iostat -xpctn 10 | egrep -v " 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 0 " | awk '{ if ( $11 == "c0t10d0s4" ) print $0 " mount point" }'
I've tried with sed 's/c0t10d0s4/c0t10d0s4 mountpoint/' with the same results. The problem is awk/sed don't show the output until its buffer has reached some length, i.e., doesn't give line by line echo of its input treated with my command. Is there any way to make it flush to stdout immediately, or any other workaround? Thanks.
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 23:24:35 EDT