From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25133 invoked by alias); 19 Jul 2013 07:34:57 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 17885 Received: (qmail 13502 invoked from network); 19 Jul 2013 07:34:51 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE, T_TO_NO_BRKTS_FREEMAIL autolearn=ham version=3.3.2 Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.192.175 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:subject:message-id:mail-followup-to:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=1Z9QF78whuZwdFXM8wFqGlWdd3gITzmJV02XwfT5734=; b=KMylV2vW6A/CuECqXITGZaf76a01wdxBw5F8LJu/olKQy77QJXKjj6nGI2IF8eXJbx +6ImDstGQ7qmukXm9tHob7SPbMVZOotiVpeP0za378BVo49BdXlHc3ZzJ2VM0y54pqY4 KMcOR3AZArQ+5zHM+Ld8wDnv+EwGeYkmKGUfGmiA45B1ykh0sEo14z5tbXuGvUMtYbLJ zI/HR3oAKqYBpx7JkjvGmLht+JNU5Sq6o6y3I495NwikX3DWy9jiBBiSNklnZKYnOHjF FnqlVIZz2LofoJ7DOIXE3kNbY+W05sohpo0RjicXdXHc3AXnEdHxPDJh6nW8BNAXm02T DmAw== X-Received: by 10.66.144.199 with SMTP id so7mr16736312pab.99.1374219283151; Fri, 19 Jul 2013 00:34:43 -0700 (PDT) Date: Fri, 19 Jul 2013 17:34:34 +1000 From: Ian Petts To: zsh-users@zsh.org Subject: Re: Problem with redirecting from serial device Message-ID: <20130719073434.GB9525@kvm1.pettsie.net> Mail-Followup-To: zsh-users@zsh.org References: <20130718055932.GA9525@kvm1.pettsie.net> <20130718221150.GA5334@redoubt.spodhuis.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130718221150.GA5334@redoubt.spodhuis.org> User-Agent: Mutt/1.5.21 (2010-09-15) > > As soon as I add a redirect or pipe to the above (to save the data to a file > > or for further processing) no data appears: > > > I don't think it's a file buffering issue, I've left it go for several hours > > with the same results. Even if I try 'more'ing the data I seem to get no > > output. > > To rule it out, could you try gawk explicitly if awk is not gawk? Thanks for the info, Phil. My awk is indeed gawk and I also tried the stdbuf command per the link you supplied. Unfortunately I am still seeing the same results. It is starting to look like a buffering problem, however, because using perl with output buffering on (the default), does not appear to work < /dev/ttyACM0 perl -MPOSIX -e '$| = 0;' -pe 'print strftime("%F %T ", localtime)' > weather.out Turn output buffering off, data is written to the weather.out file < /dev/ttyACM0 perl -MPOSIX -e '$| = 1;' -pe 'print strftime("%F %T ", localtime)' > weather.out Either case above without the redirect displays the data to the screen. -- Who is General Failure and why is he reading my disk?