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
23 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
38 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
24 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
295 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 ...
1
vote
5answers
143 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
21 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
27 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.
0
votes
0answers
48 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 ...
0
votes
0answers
40 views

Netcat server output with multiple greps

I'm trying to send some data from my web browser to a txt file on another computer by visiting http://myserver.mydomain.tld:8080/?data=some_data_I_want_to_save. This works fine as a server: echo ...
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
28 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
188 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
27 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
30 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
42 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
29 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
50 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
52 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
36 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
54 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
67 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
161 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
84 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
78 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 ...
1
vote
2answers
174 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
62 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
203 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
82 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
180 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
524 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
114 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
50 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
41 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
135 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
147 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
215 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
263 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
56 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
53 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
154 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
39 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
66 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 ...
3
votes
3answers
382 views

linux tar -T - does not work on the fly

I found some problem with linux gnu tar. wheh I use option -T - (for file list from stdin) or -T named_pipe_file , this desn't work on the fly. for example, simple interactive script: while ...
0
votes
2answers
234 views

Format data as a table in bash

I have an array of JSON data being printed to the terminal (OS X) and I want the properties of that to be displayed in a table in the terminal. Sample query: aws ec2 describe-instances | jq '[ ...
0
votes
1answer
205 views

How can I pipe the output of *all* entered shell commands into another? (e.g. pipe everything into 'lolcat')

Good Afternoon, (OS X user) I am specifically trying to pipe the output of every shell command I type into the ruby gem 'lolcat' (which makes the output to the terminal rainbow colored). Is there a ...
0
votes
1answer
173 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 ...
1
vote
2answers
565 views

Using Piping with cat and less to concatenate 2 files

I'm fairly new to Unix commands and I just have a simple question. One exercise I'm working on wants me to use piping along with cat and less to concatenate 2 directories (in this case /etc/passwd ...