Joined: 25 Aug 2010 Posts: 215 Location: Pune, Maharashtra, India
Posted: Fri 06 Jul 2012, 13:52 Post_subject:
Line-buffering the output when forewarding to a file Sub_title: [color=green]command > path/to/file[/color] doesn't flush output after every line
/tmp/pupdial.log is updated after every line of output and can be viewed in wvdial connection log.
When I try to achieve a similar thing for the volume monitor, the output is full-buffered i.e. the output is not flushed after every line. Data gets written only when it has written about 1kb. None of the following work like I want.
Code:
pup-volume-monitor &> "$LOG_FILE" #forewards stderr only
Code:
pup-volume-monitor 2>&1 > "$LOG_FILE" #forewards stderr only
How can I achieve line buffering, please help! _________________ If there's an open source project in your hand,
Don't aim for popularity, it's out of your hand.
Aim for perfection, as that's the best thing you can.
Rules_post_cannot Rules_reply_cannot Rules_edit_cannot Rules_delete_cannot Rules_vote_cannot You cannot attach files in this forum You can download files in this forum