Linked Questions

6 votes
3 answers
757 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 ...
Parthian Shot's user avatar
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 ...
Yex's user avatar
  • 13
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 ...
swennemen's user avatar
  • 131
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 ...
turtle's user avatar
  • 2,707
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 ...
MykelXIII's user avatar
  • 429
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 ...
Felix Eve's user avatar
  • 111
0 votes
0 answers
597 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 ...
Franck Dernoncourt's user avatar
1 vote
2 answers
307 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. ...
mogsie's user avatar
  • 221
1 vote
1 answer
302 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 ...
pradeepchhetri's user avatar
0 votes
1 answer
279 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 ....
user avatar
0 votes
0 answers
253 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 ...
Owen's user avatar
  • 9
0 votes
0 answers
219 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: ...
bananabook's user avatar
0 votes
1 answer
205 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 ...
Philip Kirkbride's user avatar
0 votes
0 answers
110 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 ...
Zoredache's user avatar
  • 3,690
0 votes
1 answer
100 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 ...
LostNavigator23's user avatar

15 30 50 per page
1
2 3 4 5
7