|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
|
RE: [PLUG] Basic unix pipe question
|
you could also use tee
# program1 | tee program2
George
> -----Original Message-----
> From: plug-bounces@lists.phillylinux.org
> [mailto:plug-bounces@lists.phillylinux.org]On Behalf Of Ben Dugan
> Sent: Tuesday, October 31, 2006 3:01 PM
> To: Philadelphia Linux User's Group Discussion List
> Subject: [PLUG] Basic unix pipe question
>
>
>
> I'm confused by what is probably normal behavior:
>
>
> [~]# program1 | program2
>
>
> I don't get any output (on stdout) from program2 until program1
> finishes. (I'm trying this out with simple C programs; program1 does a
> printf once every second, while program2 just watches stdin
> using fscanf
> and copies its stdin to stdout.)
>
> I've been googling and looking at some reference books I have, but I
> can't really figure out why this is. I can't coerce
> program2's output to
> happen sooner using flush, either.
>
> Any suggestions or explanations?
>
> Thanks in advance.
>
> Ben
>
>
>
>
> ______________________________________________________________
> _____________
> Philadelphia Linux Users Group --
http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion -- http://lists.phillylinux.org/mailman/listinfo/plug
___________________________________________________________________________
Philadelphia Linux Users Group -- http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion -- http://lists.phillylinux.org/mailman/listinfo/plug
|
|