Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Awk > where did outpu...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 5 Topic 2181 of 2234
Post > Topic >>

where did output redirection go?

by Tomasz Chmielewski <tch@[EMAIL PROTECTED] > Mar 7, 2008 at 10:32 AM

Consider a following shell code executed in bash:

$ while true; do date; sleep 1; done | awk '{print $4}'
10:23:19
10:23:20
10:23:21
10:23:22
10:23:23
[ctrl+c]

It prints something to the standard output.


Now, let's use the same commands, but instead, redirect the output to a 
file:

$ while true; do date; sleep 1; done | awk '{print $4}' > out.txt

[wait a minute here, and press ctrl+c]


"out.txt" file is empty, nothing was printed to the screen. Where did 
the output redirection go?


-- 
Tomasz Chmielewski
http://wpkg.org




 5 Posts in Topic:
where did output redirection go?
Tomasz Chmielewski <tc  2008-03-07 10:32:10 
Re: where did output redirection go?
Janis <janis_papanagno  2008-03-07 02:36:03 
Re: where did output redirection go?
Tomasz Chmielewski <tc  2008-03-07 11:58:36 
Re: where did output redirection go?
Janis <janis_papanagno  2008-03-07 04:39:16 
Re: where did output redirection go?
Andrew Schorr <aschorr  2008-03-09 19:26:02 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon May 12 2:47:20 CDT 2008.