Linked Questions
                        93 questions linked to/from How to turn off stdout buffering in a pipe?
                    
                
            
            
                6
            
            votes
        
        
            
                3
            
            answers
        
        
            
                791
            
            views
        
        
            
            
            
        Why does this one-liner fail to produce output? [duplicate]
                    The following produces nothing in bash:
while true ; do upower -d ; sleep 1 ; done | grep percentage | uniq
I've discovered that it doesn't matter what the last- or even the second to last- program ...
                
            
       
        
            
                1
            
            vote
        
        
            
                1
            
            answer
        
        
            
                2k
            
            views
        
        
            
            
            
        Filter out duplicate lines of tail -f [duplicate]
                    I often need to tail -f apache access logs for websites to troubleshoot issues- one thing that makes it annoying is that anyone loading a page once may cause 12+ lines to get written to the log, and ...
                
            
       
        
            
                1
            
            vote
        
        
            
                1
            
            answer
        
        
            
                2k
            
            views
        
        
            
            
        Using tee or pipe to log console output will cause my program not to start [duplicate]
                    I'm running hostapd on my raspberry PI to let it function as an accesspoint. It's working fine with the following command:
sudo hostapd /etc/hostapd/hostapd.conf
This will start hostapd and log all ...
                
            
       
        
            
                2
            
            votes
        
        
            
                1
            
            answer
        
        
            
                1k
            
            views
        
        
            
            
            
        Flush data to file frequently for long running command? [duplicate]
                    I have a command that processes data slowly. The command processes lines from a file and writes the results to the output file data.txt:
my_command > data.txt
The issue I have is that I'd like to ...
                
            
       
        
            
                0
            
            votes
        
        
            
                0
            
            answers
        
        
            
                1k
            
            views
        
        
            
        Tail and watch, filter and extract string [duplicate]
                    Lets says I have a file called test.log more rows being added all the time:
one|two|apple|four|foo1
one|two|pear|four|foo2
one|two|apple|four|foo3
one|two|peach|four|foo4
I want to tail it but am ...
                
            
       
        
            
                1
            
            vote
        
        
            
                1
            
            answer
        
        
            
                1k
            
            views
        
        
            
            
            
        Pipe blocks with the following sequence of commands [duplicate]
                    I have a script that reads a file that contains urls and then prints out the ip addresses. However, I am unable to find resources as to why the pipe blocks when I add the command 
cut -d" " -f4 
at ...
                
            
       
        
            
                0
            
            votes
        
        
            
                0
            
            answers
        
        
            
                607
            
            views
        
        
            
        How can I save a command output to a file in real-time? [duplicate]
                    How can I save a command output to a file in real-time?
For example, if my command is python log.py where log.py contains:
import time
print('testing')
time.sleep(100) # sleeping for 100 seconds
and ...
                
            
       
        
            
                1
            
            vote
        
        
            
                2
            
            answers
        
        
            
                347
            
            views
        
        
            
            
            
        locate(1) buffers its output [duplicate]
                    I'm using locate(1) from GNU findutils for a little task and it seems as if it buffers its output.  I am piping the output of locate to another task that will process the lines as locate finds them.  ...
                
            
       
        
            
                1
            
            vote
        
        
            
                1
            
            answer
        
        
            
                324
            
            views
        
        
            
            
            
        strange behaviour of strings command [duplicate]
                    I am trying to capture mysql traffic and pass those traffic to strings command as follows:
tcpdump -i any -s 0 -l -w - dst port 3306 | strings
This is working as expected and printing all mysql ...
                
            
       
        
            
                0
            
            votes
        
        
            
                0
            
            answers
        
        
            
                360
            
            views
        
        
            
            
        change the bash output with stream editing [duplicate]
                    If I call bash like this: bash|sed 's/a/b/g' every time bash outputs an 'a' it is replaced with a 'b'
$ bash|sed 's/a/b/g'
$ echo aaa
bbb
$ exit
However if I add additional substitutions like so:
...
                
            
       
        
            
                0
            
            votes
        
        
            
                1
            
            answer
        
        
            
                322
            
            views
        
        
            
            
        Running command on each line of output immediately [duplicate]
                    I found out that when I run a command which executes a software that has continuous output lines e.g. traffic monitor like tcpdump or tshark the command keeps counting numbers on screen like 4, 8, 12 ....
                
            
       
        
            
                0
            
            votes
        
        
            
                0
            
            answers
        
        
            
                324
            
            views
        
        
            
            
        Getting awk value and outputting to a file [duplicate]
                    I need to get a value from a log file which I am getting using awk at the moment. I can get the number printing on the console but when I try to put that value into a new file nothing happens. Here is ...
                
            
       
        
            
                0
            
            votes
        
        
            
                1
            
            answer
        
        
            
                230
            
            views
        
        
            
            
            
        Why isn't program output being greped? [duplicate]
                    When I run sudo wpa_supplicant -Dwext -iwlan3 -cwifi.conf 2>&1 I get:
Successfully initialized wpa_supplicant
ioctl[SIOCSIWAP]: Operation not permitted
ioctl[SIOCSIWENCODEEXT]: Invalid ...
                
            
       
        
            
                0
            
            votes
        
        
            
                0
            
            answers
        
        
            
                113
            
            views
        
        
            
        Confusion about output lost in pipeline with perl [duplicate]
                    I want to ping a remote system, and have the date show up in my output, and then feed it along the pipeline to another program.  I used cat in my examples below only to be a simple example.
I can use ...
                
            
       
        
            
                0
            
            votes
        
        
            
                1
            
            answer
        
        
            
                114
            
            views
        
        
            
            
            
        Why is this shell output cannot be written to a file? [duplicate]
                    I'm working on a linux pinephone script that would launch a touchpad emulator. In order to do so, I need to compare the output string of:
./TouchpadEmulator /dev/input/event2 /dev/input/event1
once I ...
                
            
       
         
         
         
         
        