Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Jul 2005 22:46:02 -0400
From:      Hakim Singhji <hzs202@gmail.com>
To:        freebsd-questions@freebsd.org
Subject:   Problem Piping iostat -c to awk!
Message-ID:  <42D7236A.6010803@gmail.com>

next in thread | raw e-mail | index | archive | help
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Everyone,

I am having problems with a shell script that I am writing. I am looking
to pipe the output of iostat to awk however the shell is hanging... even
at the command line it hangs. The code looks like this:

	# iostat -c 300 2 | egrep -v '[a-zA-Z]|^$' | awk '{print $1}'

This code hangs for me... now when I just pipe iostat through the
egreped patter it is fine. It's when it is passed to awk that I have
problems... now of course if I simplify the output to:

	# iostat | egrep -v '[a-zA-Z]|^$' | awk '{print $1}'

it works just fine... so it has to be the awk. What is the problem?

Best,
- --
Hakim Singhji
New York University
"But where danger is, grows the saving power also" (qtd. in Heidegger 28).
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFC1yNps2AZ6g3dZu8RAqtaAJ0UikI+OuRaYuiJJyX8wpQ00dpVsQCeNTP6
wVdnxVHipyGwyrlPU5oITF8=
=kPur
-----END PGP SIGNATURE-----



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?42D7236A.6010803>