From owner-freebsd-questions@FreeBSD.ORG Fri Jul 15 02:46:05 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 544FF16A41C for ; Fri, 15 Jul 2005 02:46:05 +0000 (GMT) (envelope-from hzs202@gmail.com) Received: from rproxy.gmail.com (rproxy.gmail.com [64.233.170.200]) by mx1.FreeBSD.org (Postfix) with ESMTP id DA14A43D46 for ; Fri, 15 Jul 2005 02:46:04 +0000 (GMT) (envelope-from hzs202@gmail.com) Received: by rproxy.gmail.com with SMTP id y7so645877rne for ; Thu, 14 Jul 2005 19:46:04 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:organization:user-agent:x-accept-language:mime-version:to:subject:x-priority:x-enigmail-version:x-enigmail-supports:content-type:content-transfer-encoding; b=JeqVcwWEPmQ/s9E9Nh1dqv65jWW7gmGD6aeoxCx1aADa7G2i+ib+wYzdxe6M1xUCaFi2MoBIBEzxgGi5EkpMPS5Ud1Sz7fT3qbyPxHG0tSRL5SSCbaTG2m+RrrPKqmAubIS/XUktqMva9LyDeOLl8KTLQHZ4R9m0fWPxpouqKjE= Received: by 10.38.209.33 with SMTP id h33mr2563422rng; Thu, 14 Jul 2005 19:46:04 -0700 (PDT) Received: from ?192.168.10.3? ([66.65.10.203]) by mx.gmail.com with ESMTP id 73sm2053930rna.2005.07.14.19.46.04; Thu, 14 Jul 2005 19:46:04 -0700 (PDT) Message-ID: <42D7236A.6010803@gmail.com> Date: Thu, 14 Jul 2005 22:46:02 -0400 From: Hakim Singhji Organization: New York University User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-questions@freebsd.org X-Priority: 2 (High) X-Enigmail-Version: 0.89.5.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Problem Piping iostat -c to awk! X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: hzs202@nyu.edu List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jul 2005 02:46:05 -0000 -----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-----