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
4answers
71 views

How does piping/redirection in Linux work exactly?

I have these three examples of redirection stdin/stdout, only one of them is working the way it is intended to. I would love if someone can explain that to me. The goal is to sort the contents in ...
0
votes
1answer
23 views

Using -replace on pipes in powershell

I want to test out a replace before I use it, so I'm trying to write a quick online command to see what the output is. However, I'm not sure what the syntax is. What I want to do is something like ...
0
votes
1answer
144 views

Continuous streaming from an empty pipe, then adding data to the pipe on demand

Essentially, what I'd like to do is to have ffmpeg continuously stream to an RTMP server using an empty pipe, then when I want to stream something, add data to the pipe. My reasons for doing this ...
0
votes
0answers
19 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 ...
3
votes
3answers
320 views

Need to understand the concept of xargs and pipes

I have been struggling with this issue for a while now and would really appreciate it if someone could clarify it for me . Suppose I am trying to pipe the two commands together. readlink and cat ...
0
votes
0answers
30 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
1answer
48 views

Piping grep causes error $'\302\240grep': command not found on linux

Sometimes when I'm catting & grepping a file, I see this error come up: $ cat something.txt | grep "some text" -bash: $'\302\240grep': command not found When I re-type the command, it works as ...
0
votes
0answers
18 views

How can I format the piped and refreshing output of multiple cmmands nicely?

I have a command line of multiple piped commands which executes beautifully in bash. For simplification: command1 | command2 | command3 Each command generates output while running, resetting the ...
0
votes
1answer
19 views

Detect IPC between running processes on Unix

Suppose I have 2 processes on any unix-based system and I sure they are using some inter-process communication. How can I detect what do they use in order to simulate or hook it? I mean pipes, for ...
0
votes
1answer
53 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 ...
4
votes
3answers
294 views

Execute command in-between a bash pipe row …?

I want to run a series of piped commands which do a lot of audioprocessing. It looks as follows in pseudocode: command1 | command2 | command3 Of command2 and command3, both take the output of the ...
1
vote
1answer
49 views

How can I use the pipeline output from different commands inside a custom bash script?

I have this simple script: #!/bin/bash # This command removes the last "\n" (line feed) character from the file specified as parameter # # Params: # $1 [FILE_NAME] - the name of the file to trim if ...
0
votes
3answers
103 views

real windows equivalent to cat *stdin*

Under cmd is there a windows equivalent to the posix command cat ? cat all by itself no filenames, no switches. I just want something that copies stdin to stdout until it hits EOF. it's not a hard ...
1
vote
2answers
113 views

How to save console output still showing it

I need to troubleshoot a telnet session and send save it's results to another person. When I use redirection I save the contents of my session, but I'm not able to see it on console. How to pipe ...
0
votes
1answer
20 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
55 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
100 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
54 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
43 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
162 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
44 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
19 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
25 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
59 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
17 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
41 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
344 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
95 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
215 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
54 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
239 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
104 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
637 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
1k 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
48 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 ...
0
votes
2answers
63 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
118 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 ...
54
votes
2answers
5k 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
7k 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
63 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
1k 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
1answer
52 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
245 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 ...
1
vote
0answers
156 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
33 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
127 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
140 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 ...
1
vote
1answer
254 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 ...
2
votes
1answer
2k 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
207 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 > ...