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
0answers
6 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
votes
0answers
22 views

How to edit a text file over a network with netcat plus some $EDITOR

(no alternate suggestions like vim --servername, or vim over ssh, or "just use ssh", or nfs, sshfs please. Also I prefer to avoid more elaborate incarnations of netcat like ncat) I'd like to edit my ...
1
vote
2answers
26 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.
6
votes
1answer
255 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
55 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
55 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
29 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
61 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
36 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
313 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
351 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
25 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
33 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
58 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 ...
50
votes
2answers
2k 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
1k 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
32 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
276 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
9 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
28 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
41 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
57 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
30 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
60 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
63 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
37 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
74 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
79 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
307 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
97 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
97 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
229 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
81 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 # # ...
0
votes
1answer
234 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
96 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
237 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
671 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
152 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
52 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
47 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
167 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 ...
0
votes
2answers
193 views

How to redirect a part of stderr and stdout to /dev/null

My program outputs to stderr and stdout. I want to grep for "pattern" either in stderr and stdout. And I want the rest to be sent to /dev/null. If I pipe after redirect stderr : ./prog 2>/dev/null ...
2
votes
2answers
231 views

PHP output piped to 'less' is requiring <enter> after every command

Piping PHP output to the linux 'less' command causes 'less' to really act up. (CentOS 6.2, didn't happen with CentOS 5.) When I pipe output from php into 'less', it requires the enter key be pressed ...
0
votes
0answers
286 views

mysqldump to local mysql database through ssh

This command: ssh bruchowski@www.example.com 'mysqldump -u bruchowski -p dbname' > mysql -u root dbname Produces this error: mysqldump: Got error: 1045: Access denied for user ...
1
vote
1answer
63 views

Linux - Output to Folder that Yet Exists (in one command)

Is it possible to achieve this in one command without requiring a script: echo "test" > /folder/that/does/not/exist/newFile.txt
0
votes
0answers
54 views

Is there a terminal emulator in windows with slave mode like xterm?

I am writing a CPU emulator and it simulates some peripherals as well. One of these peripherals is UART interface. I want to use a terminal emulator as the slave of my application so that I can ...
5
votes
1answer
59 views

How many ways does Unix feign files?

I know Unix filesystem sometimes has things that appear to be files but are not actually files. The files in dev actually point to devices. Its also possible to created named pipes which also appear ...
1
vote
1answer
175 views

Programs detecting pipe on its output to disable coloration

Some programs have a colored output (such as grep or emerge on my gentoo system), but if their output is piped, into less for example or into a file, the colored output is disabled. Yet, I know less ...
0
votes
0answers
43 views

How to port script with pipes from Linux to Windows?

In relation to the following question, I have produced the following script snippet. .gdbinit: # Open openocd and pipe data throudh stdin/stdout. # Openocd quits after gdb exits. target remote | ...
4
votes
2answers
69 views

Sort files with grep

I have a few hundreds of output files, of which some contain error messages. Lets say I want to automatically put all files containing the string "ERROR_1" in a "subfolder_1", and the rest in a second ...