Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Problem with redirecting from serial device

> > 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

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?

Messages sorted by: Reverse Date, Date, Thread, Author