Joined: 25 Aug 2010 Posts: 202 Location: Pune, Maharashtra, India
Posted: Fri 06 Jul 2012, 13:52 Post subject:
Line-buffering the output when forewarding to a file Subject description: [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.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum