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
2answers
14 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
23 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
29 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
22 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
0answers
13 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
17 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
43 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
31 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
31 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
1answer
51 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
30 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
85 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
39 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
66 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
204 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
64 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
38 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
32 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
54 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
67 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
167 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
191 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
45 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
47 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
57 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
94 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
35 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 | ...
3
votes
2answers
63 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
237 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
192 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
129 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
130 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
351 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 ...
0
votes
2answers
715 views

tar piped to curl: This does not look like a tar archive

curl -L http://download.transmissionbt.com/files/transmission-2.80.tar.xz -s -o - | tar -xf - The error: tar: This does not look like a tar archive tar: Skipping to next header tar: Exiting with ...
1
vote
1answer
113 views

Having trouble piping output of dscl -list to -dscl read using xargs

I'm trying to get every user using dscl and reading each of their records using xargs and dscl. I'm not sure what I'm doing wrong, though, because I would expect this command to take each line of ...
1
vote
3answers
132 views

Pipe with ls command

When I want to know if a command is a link or not, I do like following. $ which locate /usr/bin/locate $ ls -l /usr/bin/locate lrwxrwxrwx 1 root root 24 5月 3 2012 /usr/bin/locate -> ...
0
votes
1answer
215 views

Running pdfcrack to include special characters in charset

I'm trying to recover a password from a PDF file using pdfcrack. I want to change the charset to include special characters. Can I use some kind of i/o redirect to feed the contents of a a similiar ...
1
vote
1answer
29 views

How do I save from VI to a pipe?

I've seen lots of ways to redirect input from stdin to VI, but I'd like to redirect VI to save to a pipe rather than a file. For example, I'd like to pipe VI's entire pipe buffer to another text ...
0
votes
0answers
84 views

How to pipe regex with ffmpeg and perl?

So I am trying to get the current frame of the conversion with this bash command: ffmpeg -i fd.mp4 fd.avi < /dev/null 2>&1 | perl -015 -e 'print <STDIN>=~/frame=(\ {3})(\d+)/' | sed ...
0
votes
1answer
135 views

Streaming log file contents (piping)

I am trying to understand how piping works and am stuck at this point. A log file is being streamed and its output is being piped to pigz. What I am trying to do is, redirect the pigz content to a ...
1
vote
1answer
152 views

Why the here-strings in bash are slower than piping the input to a command?

I compared the execution time for unix here-strings and pipe data input to bc: pipe time for i in {1..1000} do echo "sqrt(5.09)" | bc -q > /dev/null done real 0m3.584s user ...
2
votes
1answer
719 views

Pipe VLC output to ffplay?

I have a (broken) PC, where VLC plays videos on only the left half the screen, which seems related to OpenGL/drivers (see here). On the other hand, ffplay doesn't have the half-window problem, but can ...
0
votes
3answers
238 views

How to print out all non-hidden files recursively in a dir using lpr

find . -type f | grep -v '/\.' lists out all non-hidden files in the current dir recursively. Example of this command given the following file tree . ├── css │   ├── base.css │   └── main.css ├── ...
3
votes
2answers
232 views

Why is xargs necessary?

Suppose I want to remove all files in a directory except for one named "notes.txt". I would do this with the pipeline, ls | grep -v "notes.txt" | xargs rm. Why do I need xargs if the output of the ...
0
votes
1answer
93 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 ...
1
vote
1answer
359 views

Flushing a named pipe

I am using the following to redirect output from my script to both terminal and log file while appending date to every line that goes to the log file: NPIPE=/tmp/$$_$RANDOM.tmp mknod $NPIPE p tee ...
-2
votes
2answers
161 views

When did the windows command line get the pipe (|)? [closed]

I freely admit I have very little experience with the Windows cli but I seem to recall that DOS had no pipe (or redirect for that matter, but I may well be wrong, its been a while). I have seen some ...
3
votes
3answers
1k views

How to pipe data over tcp from the command line?

I would like to pipe data from one machine in the command line to another machine over tcp. I guess I could write a socket server but this must already be implemented. For example I could use it to xz ...
1
vote
1answer
235 views

grep with colored output returns several empty lines

I have strange issue with grep (2.12-2, debian testing). In some situations when I do something like this: grep -rni '."spacer">.' . grep return me several empty lines: If I add --color=none ...
1
vote
1answer
155 views

Shell script detecting errors from command called by script

I am calling applications from my shell script, which performs a number of important steps in sequence, one step being below: for database in $( echo 'show databases;' | mysql ...