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

1
vote
2answers
30 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
63 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 ...
1
vote
1answer
16 views

Grep result of command, redirection vs pipe

Can someone explain why the two commands below give different results? The first pipes the output of who to grep, the second takes the output of who as a redirection. ~: who |grep $(tty|cut -c 6-) ...
1
vote
1answer
75 views

Piping lines to repeat commands

If my grep operation returns a list of IDs like in the following, can I somehow feed/pipe each line to a commandline command's parameter?: 12345 84758 49549 .. Like for example with the above ...
1
vote
1answer
447 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 ...
1
vote
1answer
966 views

How to solve “Broken Pipe” error when using awk with head

I'm getting broken pipe errors from a command that does something like: ls -tr1 /a/path | awk -F '\n' -vpath=/prepend/path/ '{print path$1}' | head -n 50 Essentially I want to list (with absolute ...
0
votes
1answer
75 views

How to kill/rm pipe by inode number only?

EDIT: I originally cut and pasted a question I'd asked earlier on stackoverflow that got closed: http://stackoverflow.com/questions/32622224/how-to-kill-pipe-by-inode-number-only I've now run into ...
0
votes
1answer
32 views

XTerm buffers output when reading from fifo

I have an xterm window that I would like to continually display the output of a named pipe. However, there seems to be some buffering occurring, and I can't find where it is happening. I open two ...
0
votes
1answer
34 views

Use disk-backed buffer between pipes

I'd like to pipe a command into a slower one, with a rather big (~200GB) buffer in between. Here is an example use-case: command1 | buffer -f file.buffer | command2 Is there a command to do that? ...
0
votes
1answer
47 views

How to store data from different netcat connections in separate files?

I need a server that should receive data streams, store them in files and send further. Each connection should create a file with corresponding timestamp in file name, then write to it. My solution: ...
0
votes
1answer
136 views

Batch to retrieve TFS version erroring in FOR /F where TFS attempts to PIPE to findstr

I have this partial batch, but it gives me an error (On 64 bit installations) SETLOCAL EnableDelayedExpansion REM Figure out what ProgramFiles Root we run the command SET ...
0
votes
1answer
2k 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
1answer
349 views

Why does echo work through pipe but not cat with msmtp?

This works: echo "yada yada" | msmtp my@mail.com but not this: cat yadayada.txt | msmtp my@mail.com which delivers the email with empty content. Why does echo work through pipe but not ...
0
votes
1answer
199 views

redirect awk information to stdout

I am trying to gather information for CPU use for all the processors in a text file. mpstat -P ALL -u 1 | awk '{print $4}' > cpu.txt && mptat -P ALL -u 1 | awk '{print $4}' | tee cpu.txt ...
0
votes
1answer
583 views

OS X: log text from serial port

I have a text stream coming in on a USB-RS232 adapter. I want to pipe it to some Unix tools, to a file, whatever. What is the simplest way to do so? Does it really require third-party software? OS X ...
3
votes
0answers
370 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 ...
1
vote
0answers
39 views

Circular pipe in Windows command line

Given two applications A and B, is there a way to invoke them in Windows such that the standard output of A goes to the standard input of B and the standard output of B goes to the standard input of ...
1
vote
0answers
276 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 ...
1
vote
0answers
2k views

'No such interface supported' when attempting to compress file through 7zip commandline

When I run the 7zip commandline: > echo foo | 7za a arc.7z -sifoo.txt Everything works as expected, but if I try to do: echo foo | 7za a arc.zip -sifoo.txt I get the following: ...
0
votes
0answers
38 views

How to redirect video subtitles to pipe?

I am watching subtitled videos. I would like the subtitles to be sent to a pipe instead of being displayed on the video. The aim is to process the subtitle data with some other software, like sed, in ...
0
votes
0answers
24 views

Read binary file of expected size blocking until the size is equals expected

I want to read a dowloaded file while it is being written for instance with tail -f -c +1 $filename and to redirect it to another tool (which decodes it) with a pipe |. This works fine but I am doing ...
0
votes
0answers
67 views

Unable to trim piped video stream with FFmpeg

Trying to trim a video file that gets piped from the standard input, it only works when the start duration is greater than 2.0s for some videos (fails for ones captured from an Android phone to be ...
0
votes
0answers
16 views

Piping back resulting stream from split remote commands

I'm trying to perform the following: (1) generating data on my local workstation (2) piping this data (huge amount!) once to my remote speedy server (3) performing two separate operations on this ...
0
votes
0answers
45 views

windows command line find file, untar

I want to untar a file I just downloaded in windows 7. I am in the directory, but there are too many files and the name is too long to simply type out. How would I do this in the command line? If this ...
0
votes
0answers
26 views

How can I run multiple sets of pipe-linked commands in parallel?

I want to run several sets of tasks connected by pipes in parallel like so: app1 "input_file_1" | app2 > "output_file_1" app1 "input_file_2" | app2 > "output_file_2" ... What is the cleanest ...
0
votes
0answers
28 views

Pipeline from <filename> to <filename> in Windows CMD?

Is there a way to do this without a temporary file? I've tried with tee but that failed. Test case: >echo "foo bar" > ex2.go >type ex2.go "foo bar" >type ex2.go > ex2.go >type ...
0
votes
0answers
86 views

How to pipe arguments into stdin?

I am trying to generate a private key using keytool command, but it asks me for many details like my key passphrase, my name and my organization details. I want to pass all the inputs in one command. ...
0
votes
0answers
372 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
0answers
112 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
0answers
516 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 ...
0
votes
0answers
106 views

mutt colorizing piped messages

Viewing messages in mutt are colorized, but piping them through the less pager removes colorization. How do I preserve message colorization? I've tried: | less -R but colorization is stripped ...