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

3
votes
1answer
44 views

How to sort the output of find? [duplicate]

I'm using the find command to list files with their name containing a string: find ~/ -type f -name "*inductive*" I would like to use a pipe to sort the resulting list of files. I would like to be ...
1
vote
1answer
13 views

Pipe to less but keep the highlighting

Is it possible to pipe some output (e.g. dmesg) to a command like less (or an equivalent command) and keep the text highlighting used by the original command printing? example: on the left dmesg | ...
0
votes
1answer
24 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
0answers
19 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
16 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
1answer
36 views

combining tail -f with less +F does not work

I am using ubuntu bash. I am trying to combine tail -f and less +F like below and nothing is coming out. tail -f long_running_log | less +F long_running_log is a log file constantly being written ...
0
votes
1answer
53 views

How would one pipe from socat to sed to bc to xargs?

I have a server outputting some numbers, I'm reading them with socat, then using sed, I turn those numbers into some math equations, I run them with bc, then I need to pipe them into xargs. socat -u ...
1
vote
4answers
90 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
58 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
279 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
22 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
344 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
43 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
80 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
21 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
24 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
66 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
354 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
78 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
154 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
241 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
21 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
57 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
133 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
56 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
51 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
188 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
47 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
29 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
64 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
19 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
45 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
360 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
104 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
253 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 ...
1
vote
1answer
265 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
115 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
738 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
2k 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
56 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
78 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
130 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 ...
59
votes
2answers
6k 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
8k 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
71 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
63 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
327 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
185 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 ...