Pipes or named pipes are a feature of the POSIX standard that allow separate processes to communicate with each other without having been designed explicitly to work together.

learn more… | top users | synonyms

0
votes
1answer
10 views

pv: Change Prefix on the Fly

To me pv is really handy some times. However, I was wondering if it was possible to change the prefix on the fly. I mean usually I have something like in.sh | pv -btrcN "Watch that work!!1!" | ...
2
votes
1answer
52 views

Passing the output of locate as an argument to an editor

What I mean is doing this in a 1-liner: ubu@ubuntu:~$ locate filename.sh /home/ubu/path/to/filename.sh ubu@ubuntu:~$ gedit /home/ubu/path/to/filename.sh I can't seem to figure out the right piping ...
1
vote
1answer
28 views

How to split and recombine stdout pipe in bash?

I am parsing text on the command line. How can I take the output of one command and use it in two places in the next command? some_command | head -n $( awk '/search_term/ {print FNR} ...
3
votes
1answer
49 views

redirect a file generated by a program to another program

In linux enviroment, I have a program that creates a large file (2-3GB). I need to filter this file (e.g. I want to remove a line if it appears in the precedeing 10 lines). I want to do it while the ...
2
votes
1answer
23 views

Pipe standard error to file and keep it on standard error?

I have a script (fragment) for which I'm logging output and standard error: #!/bin/sh #... { date "+%Y-%m-%d %T" cd $workdir ls -ltr validfile badfile #example command that provides stdout, ...
0
votes
0answers
60 views

Pipe ffmpeg->ffmbc cut files after some length

I recently tried the following command: ffmpeg.exe -i "C:\Users\Dennis\git\cnn\CNN\watch\filea.mp4" -i "C:\Users\Dennis\git\cnn\CNN\watch\fileb.mp4" -filter_complex ...
0
votes
2answers
38 views

Win7 Command Line piping

I want to know why in the command line prompt this happens. I have a script fileX.cmd which is one single line of text: @echo dir If I do C:\Users\Dogfood>fileX.cmd | cmd This will show all ...
0
votes
1answer
9 views

Is it possible to count from a given number when extracting images from a video with FFmpeg?

I am using ffmpeg to extract still images from a video. First from the beginning of the video, to a given time and then from the end of the video from a given time. So I am using two ffmpeg command ...
1
vote
2answers
17 views

How do I output a variable without changing if it has a newline or not in a shell script?

I have a shell script that takes input from another shell script. The stream gets piped in on stdin. I need to capture all the bytes of the stdin stream to a single variable in the shell script. ...
0
votes
2answers
47 views

Ping piped to txt does output nothing

Following script should pipe the ping output to a text file @echo off rem end with ctrl+c y ping 192.168.33.65 -t >> C:\_ScriptLog\Ping\ping.txt but nothing is piped to the txt file, it´s ...
0
votes
0answers
10 views

Merge two outputs into one in real time without scrambling them in linux

Is it possible to merge two real time outputs into one file without scrambling the new lines? What I want to do is something like cat <(/proc/kmsg) <(while true; do echo hello; sleep 1; done) ...
1
vote
2answers
36 views

Trying to cat the result of piped commands

I have a folder of files that are named list20140801.txt list20140802.txt .... I'm trying to do this ls | sort | tail -3 | cat But it is just giving me the file names, not cat'ing them.
7
votes
1answer
293 views

Multiple unix pipes not working

This first pipeline works fine (printing "c"): echo "a" | sed 's/a/b/' | sed 's/b/c/' This one does not do what I expect (nothing gets printed when I feed an "a" into my fifo ): mkfifo fifo; cat ...
1
vote
3answers
74 views

Pass stdin to multiple programs without closing

I want to split and GZip a large file, and this answer appeared to be what I'm looking for, and it seemed like a very useful way of doing things I never thought of, so I'd like to generalize it; the ...
0
votes
1answer
158 views

How to shuffle large text files efficiently while piping it on Linux?

I have a text file that is couple GBs. I am trying to shuffle this text file in a pipe. For example these are some sample lines of what I am using but it is not efficient and in fact the pipe does ...
0
votes
0answers
44 views

Multiple grep command and show after line

I have this command grep -iE -A18 "$(date +"%Y-%m-%d").*error" * | grep -v -A18 'Movig to Error Queue' but the result shows me the 18 line after 'Moving to Error Queue' but I do not want that. I ...
1
vote
1answer
162 views

Use 'find' command to search for PNG files, pipe output to imagemagick for batch conversion

I've got a directory with thousands of image files, mostly JPG but some PNG. The files have no extension, they're just numbered. I need to convert all of them to JPG. Using find I can get a list of ...
3
votes
1answer
66 views

Using pv(1) to limit rsync speed

I'm trying to use pv rather than rsync's builtin --bwlimit to limit the bandwidth of an rsync transfer because --bwlimit is implemented in an eventually-consistent way, and my transfers are so short ...
5
votes
2answers
428 views

How to a open a file in vim using pipe

I get to use the locate command extremely often. So if I run the following command. locate updatedb | head -1 Then it gives me the O/p /usr/updatedb.conf I wonder if there is any such command ...
4
votes
6answers
756 views

How can I both pipe and display output in Windows' command line?

I have a process I need to run within a batch file. This process produces some output. I need to both display this output to the screen and send (pipe) it to another program. The bash method uses ...
1
vote
1answer
38 views

Pipeing lines to repeat commands

If my grep operation returns a list of ID's like: 12345 84758 49549 .. can I somehow feed/pipe each line to a commandline command's parameter? Like for example with the above result from grep, I'd ...
0
votes
2answers
45 views

Use grep to find files and pipe/open to open them

How can I pipe files from grep to open all matching files? I've tried grep -li "type" * | open, but that does not work.
1
vote
1answer
89 views

How to parse pipe with multiple commands independently?

How can I parse output of a single command by multiple commands without truncating at each step? For example ls -al|grep -i something will pass every line that has "something" in it to the next ...
51
votes
2answers
3k views

Why is piping 'dd' through gzip so much faster than a direct copy?

I wanted to backup a path from a computer in my network to another computer in the same network over a 100 Mbit/s line. For this I did dd if=/local/path ...
8
votes
5answers
3k views

What does the linux pipe symbol “|” do? [duplicate]

Here is a command that sorts files in a folder in reverse order ls | sort -r What does the | symbol in that command do? What I'm really looking for here is high level (easy to understand) ...
0
votes
1answer
47 views

Bash: multiple commands with pipe on 1 line

This command gets my ip address: who am i|cut -d "(" -f2 | cut -d ")" -f1 output: 10.22.184.126 this command sends a ZPL command to 10.22.184.126 on port 5964: printf ...
2
votes
2answers
558 views

Real-time loopback interface packet capture on Windows with RawCap, Wireshark, and some pipe utility

After stumbling across another Super User post about loopback packet capture on Windows, I was directed to RawCap, a utility that provides pseudo-capture of loopback packets. RawCap writes to libpcap ...
0
votes
0answers
11 views

remove permission spam for find is not working tcsh enviroment

Hello this question is asked a lot like here: However, my environment on (csh or tcsh) seems to add a space but I can't figure out why. for instance, on bash: find /. -user `whoami` 2>/dev/null ...
0
votes
1answer
35 views

Sed is not Interpreting Pipes Correctly

OK, this is hard to explain, so I will give a reproducible example: I have a text file test.txt contains the line: somesetting-parameter /an/old/path I want to replace it with a path I can get via ...
0
votes
1answer
98 views

Redirect output to printer via device file?

Is there a way in Linux to print a file with a modern printer (a Canon MX870 in my case) by redirecting text to a device file? I imagine the command to look something like this: cat my_notes.txt ...
0
votes
0answers
96 views

Using pipes on ffmpeg has different behaviour than using files

I am using pipes to provide input and to send out output from FFmpeg The command I use is essentially ffmpeg -i pipe:0 -f flv pipe:1 I am using a Java program that basically provides an input ...
0
votes
2answers
32 views

CLI tool to graphically select lines during piped commands

Is there a tool similar to choose that I can plug into chain of commands that will let me select (multiple) lines for the next step? choose unfortunately doesn't "pass on" the line you select, ...
1
vote
2answers
87 views

extract archived .bz2 files inside a .tar archive with a single command

i need to decompress .bz2 files inside a .tar archive (two step decompression) For example: requested_files_1.tar has multiple .bz2 files inside. How can I extract them with a single ...
0
votes
1answer
92 views

Bash alias with Sed not working

Does anyone know why this alias isn't working? alias tailsed="tailf error.log | sed -e 's/\\n/\n/g' -e 's/\\t/''/g'" I've tried replacing the single quotes with doubles so that it's like: alias ...
0
votes
0answers
40 views

redirect tar notices when used with pipe

I have a remote backup cron script that contains the following line: cat ${list} | xargs tar Jlcf - | ssh -i /root/.ssh/backup \ seron@dummy.net "backup_${DATE}.txz" It gives tar a list of ...
1
vote
1answer
127 views

SoX pipe operations and data loss

When piping operations using SoX, I've noticed that files get shorter than they should: Works fine: sox -n -r 44100 silence.wav trim 0 1 sox --combine sequence silence.wav combined.wav soxi -D ...
0
votes
0answers
97 views

ffmpeg set duration when muxing from fifos to pipe

I'm trying to mux two files (audio and video) coming from fifos and to output the result to a pipe. The input files are one mp4 h264 file and a m4a aac, and the output file should be a matroska ...
2
votes
1answer
1k views

Is there a way around broken pipe?

I have a directory with a large number of files. ./I_am_a_dir_with_many_subdirs/ Within a script I'd like to find all subdirs in it, to sort them and to output to a bash array. So, I do: ...
0
votes
0answers
128 views

error with upstart script

Further to my last question, I'm now using logger. I have the following upstart configuration start on runlevel [2345] stop on runlevel [06] respawn pre-start script exec 2>&1 > ...
0
votes
2answers
146 views

Pipe core dumps from script

I am making a testing script to compile (via make) and run a bunch of tests. I have a series of cat, grep and sed commands that organizes the results of all the tests nicely, however core-dumps are ...
3
votes
2answers
452 views

How do I pipe output to date -d “value”?

I have a date like "2014-01-30 05:04:27 GMT", and if I run date -d "2014-01-30 05:04:27 GMT", the output is in my server's timezone ("Thu Jan 30 16:04:27 EST 2014"). With the use of grep and cut, I ...
0
votes
1answer
113 views

debian keyboard key pipe not working , giving # instead.?

I have been using virtual box Debian and am unable to use the pipe key on the keyboard(hp -British) .the pipe key gives "# " instead and "# key" gives "pound sign"?. please help | gives # # ...
1
vote
2answers
328 views

How to unrar the STDIN?

What I have tried: cat archive.rar | unrar x - cat archive.rar | unrar x /dev/stdin cat archive.rar | 7z x - cat archive.rar | 7z x -si cat archive.rar | 7z l -si The unrar doesn't recognise the - ...
0
votes
0answers
122 views

Force FFMPEG to honour timestamp when receiving raw frames

My app interface is recorded with FFMPEG: ffmpeg -f rawvideo -vcodec rawvideo -s,1280x720 -pix_fmt argb -r 15 -i - -c:v libx264 -b:v 1024k result.mp4 All works very well except that the output ...
1
vote
2answers
475 views

How do you use PIPESTATUS, tee and /bin/sh together?

When I run curl | tee test.txt; echo ${PIPESTATUS[0]} I correctly see curl: try 'curl --help' or 'curl --manual' for more information 2 But when I try to run exactly same command using ...
0
votes
1answer
968 views

Add custom time to video frames using ffmpeg

I am using ffmpeg to encode raw pixels data (bgr32) into a video file. Pixels data is being sent from java application to ffmpeg stdin pipe. I am looking for a way to add a timestamp overlay to each ...
0
votes
0answers
227 views

No prompt for password when piping through ssh

i'm trying to use partclone to clone a partition and send the .img on my ssh server.That's what i do : partclone.ext2 -c -d -s /dev/sda1 | ssh -p xxxxx username@serveraddress "cat > backup.img" when ...
0
votes
0answers
55 views

how do you monitor the progress of a command line program?

We have some custom command line programs at our Windows shop. These commands are scheduled to run (from within bat files) at regular intervals using the Task Scheduler. Our tasks pull data from ...
0
votes
1answer
49 views

Can one redirect too much data?

I am working on a Linux system that runs on Kernel 3.2.0. On this system I wrote a program that in the end will generate roughly 50GB of data that it then would send to stdout. This output I want ...
1
vote
0answers
222 views

pipe unlimited curl stdout into chunked files

I've got an HTTP-endpoint that serves an unlimited stream of events. Now I'd like to record that stream using curl, but splitting the recorded files at the same time - preferably based on the line ...