From: Ian Petts <ipetts@gmail.com>
To: zsh-users@zsh.org
Subject: Re: Problem with redirecting from serial device
Date: Fri, 19 Jul 2013 17:34:34 +1000 [thread overview]
Message-ID: <20130719073434.GB9525@kvm1.pettsie.net> (raw)
In-Reply-To: <20130718221150.GA5334@redoubt.spodhuis.org>
> > 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?
prev parent reply other threads:[~2013-07-19 7:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-18 5:59 Ian Petts
2013-07-18 22:11 ` Phil Pennock
2013-07-19 7:34 ` Ian Petts [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130719073434.GB9525@kvm1.pettsie.net \
--to=ipetts@gmail.com \
--cc=zsh-users@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).