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
16 views

ffmpeg piping to aucdtect in a batch file

I am trying to pipe ffmpeg output to auCDtect in a batch file like this: ffmpeg -i %1 -acodec pcm_s16le -f wav - ^| auCDtect.exe -- For some reason aucdtect just freeze at Data analysis: [...
3
votes
3answers
12k views

Netcat/socat behavior with piping and UDP?

I guess this is close to linux - Netcat stops listening for UDP traffic - Super User, but I thought I'd better ask anyways As far as versions of netcat I'm using Ubuntu 11.04 and the default netcat ...
13
votes
5answers
9k views

Bash: create anonymous fifo

We all know mkfifo and pipelines. The first one creates a named pipe, thus one has to select a name, most likely with mktemp and later remember to unlink. The other creates an anonymous pipe, no ...
0
votes
2answers
24 views

Bash Sed Pipe to Command One-Liner

I'm trying to dump output from all of my interfaces. This is what I've got so far: ifconfig | awk '{print $1}' | sed s'/.$//' I'd like to have something like : ifconfig | awk '{print $1}' | sed s'/...
1
vote
2answers
637 views

pipe from ssh to windows “ssh server 'tail err.log' | tool.exe”

I want to live monitor a logfile generated on a remote linux host with a windows tool. I'm looking for something like: $> ssh remoteserver 'tail -F /var/log/err.log' | tool.exe But on Windows. ...
0
votes
1answer
8 views

Inplace modification of incron monitored files

I have samba share where users create video files, i need to stripe audio tracks from that video files and rsync new files to remote folder. I monitor the samba share with CLOSE_WRITE option, to strip ...
14
votes
7answers
11k views

Advantages of cat'ing file and piping to grep

Are there any additional advantages of cat'ing a file and piping it to grep, besides convenience? The convenience being that, when I retrieve commands such as those below from my history, the cursor ...
10
votes
4answers
18k views

Why does this not work? “ls *.txt | xargs cat > all.txt” (all files into single txt document)

Why does this not work? ls *.txt | xargs cat > all.txt (I want to join the contents of all text files into a single 'all.txt' file.) find with -exec should also work, but I would really like to ...
1
vote
0answers
4 views

Linux filter which convert data coming from pipe to chunked transfer encoding

I usually use Open3.popen3 in my Ruby CGI scripts to start a Linux command, parse its standard output and converting the bytes to the chunked transfer encoding ( https://en.wikipedia.org/wiki/...
1
vote
1answer
29 views

conditional pipe in bash

Is there any built-in way in bash to pipe output further if certain test condition is met? Essentially I want to know if I have to write following function myself or is there some good-practice-...
41
votes
3answers
8k views

How to rate-limit a pipe under linux?

Is there a filter which I could use to rate-limit a pipe on linux? If this exists, let call it rate-limit, I want to be able to type in a terminal something like cat /dev/urandom | rate-limit 3 -k | ...
-1
votes
1answer
40 views

Create file - pipe to output

At first I must say that my English is not very well. I have to do my task from studies and I have a problem. I have to make file with version in the proper catalog. Information are in text file for ...
3
votes
4answers
1k views

Linux: Limiting data throughput (pipe) in bytes per second?

I was wandering if there is a Linux program that can limit data throughput of a pipe - in actual bytes per second?. From what I gather, applicable for the purposes would be bfr, however, it has ...
0
votes
1answer
145 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. ...
1
vote
1answer
41 views

Piping credentails to git push

Whenever I execute git push, I have to type my username and password at the prompt manually. However, I want to automate this process. So, I tried to pass the credentials to the command using ...
0
votes
0answers
25 views

redirect output from COM1 on windows to a remote file on unix

Im trying to send the output from COM1 on my windows machine to a file on my aix server but its not working, so far i have tried commands like this: type com1: | plink -v hostname -l username -pw ...
0
votes
1answer
33 views

Pipe in Environment variable in fish shell doesn't execute the first command?

I want to set fish_greeting to date --rfc-2822 | cowsay -f tux | lolcat (don't judge me). When I run date --rfc-2822 | cowsay -f tux | lolcat interactively, I get the proper output (the date in a ...
0
votes
1answer
39 views

How to pipe binary stdout to a compressed tls connection?

Not so long ago, I could use : cat somefile.txt | openssl s_client -connect server:port -quiet -comp However, this command doesn’t work, even with-ign_eof: $ cat somefile.bmp | openssl s_client -...
3
votes
1answer
106 views

How to pipe AWK command output to Python as first argument

I have a plain text file input.txt which looks like: D000001 D000001 44 1975 D000001 D000408 1 1983 D000001 D000641 1 1977 D000001 D000900 27 1975 I process this file using simple AWK line: awk '{...
8
votes
3answers
1k 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 ...
0
votes
1answer
22 views

How to pass the output of one echo to the input of another?

I am trying the following echo 5 | echo but get nothing. What is wrong?
0
votes
0answers
47 views

Backup an arborescence from Robocopy /CREATE to WinRAR archive in one step

I would like to know if it's possible to save a large arborescence / file tree using Robocopy with /CREATE switch (which creates zero byte files -- the purpose is to have a reference of the files/...
3
votes
3answers
1k views

Pipes, shell scripts and ulimit

I have a command that I'm calling from code: execvp('generate', ...) which is an executable program that my code communicates with via stdin, stdout and stderr. This works fine, not a single ...
0
votes
1answer
90 views

Pipe ffmpeg output to other process

I want to pipe ffmpeg output to some other process like this: ffmpeg -video_size 1920x1080 -framerate 25 -f x11grab -i :0.0 - | process. I get Unable to find a suitable output format for 'pipe:' pipe::...
1
vote
1answer
17 views

How to plot column in unix in one line

I would like to plot a column of data output by a script in unix in just one line. For example, something like script | cut -f2 -d ',' | gnuplot ....
1
vote
0answers
104 views

ffmpeg pipe images extracted from video

I can use the following command to extract images from a video using ffmpeg, saving them to the filesystem: ... | ffmpeg -i - -f image2 'img-%03d.png' I would like to pipe these images to another ...
1
vote
2answers
769 views

Split an[d] archive large backup file in constant working space

I'm currently attempting to use tar and split to get DVD-sized archives of my Time Machine backup database. It's going to work this time, as I have a partition on my external drive large enough to ...
1
vote
2answers
264 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 ...
1
vote
2answers
2k views

Split a large .gz file and gzip each of split file?

I have a large text.gz file (2GB) and I want to split it by line. I tried to use: zcat text.gz | split -l1000000 However this generated a huge file (around 92GB before I terminated it) and put too ...
0
votes
0answers
73 views

How can I pipe multi-streamed http input (i.e., parallel downloads for greater speed) into ffmpeg

I'm trying to pipe multi-stream (really parallel download streams/connections) http video into ffmpeg so I can load data faster than the native http client in ffmpeg. i.e., let's say one connection ...
4
votes
2answers
390 views

Pipe file content into PowerShell command without loading the entire file to memory

I've recently started using PowerShell, hoping to never miss Bash again. I want to restore an instance of a PostgreSQL database. In Bash, or in the old command prompt, I would type: psql --...
1
vote
1answer
21 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-) ...
3
votes
1answer
38 views

file splitting and compression in pipeline

So I have a massive file something like this... 1/20/2016,somerandomdata 1/20/2016,somerandomdata 1/20/2016,somerandomdata 1/20/2016,somerandomdata 1/21/2016,somerandomdata 1/21/2016,somerandomdata 1/...
0
votes
2answers
54 views

How to perform batch commands in terminal for files in each folder

I have a folder which contains some folders inside. In each folder there are some bmp files. I want to go inside each directory, convert bmp images to pgm format and remove original bmp files, and ...
5
votes
2answers
4k views

Notepad++, Run command and open output in new tab

Is there any way to execute a command from notepad++ and have the results piped back into the program in a new tab?
0
votes
1answer
13 views

Linux redirection pipe

I was testing out a kind of backwards indirection and came across this. I'm not specifying the desired behavior as there is none - I just want to understand the results - a sym link to an (unnamed?) ...
1
vote
1answer
144 views

reading stdout in pipeline using “-” fails for “docker exec”

I want to launch a bash terminal for my Docker instance by piping the first container ID to docker exec: docker ps | head -2 | grep -v CONTAINER | cut -d' ' -f1 | docker exec -i -t - bash The final ...
0
votes
0answers
54 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 ...
61
votes
6answers
13k views

How can I save the current contents of less to a file?

If I've piped the results of a command to less and then decided that I want to save the contents to a file, is this possible? I've tried setting a mark a at the end of the buffer, and then returning ...
3
votes
3answers
392 views

How do I make a bash alias that outputs file names in a format I can pipe to vim?

When rebasing with git, I'm interested to open the files that have merge conflicts. I can do this with: vi `git diff --name-status --diff-filter=U | awk '{print $2}'` but if I alias that: alias ...
0
votes
0answers
28 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 ...
3
votes
0answers
420 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
1answer
87 views

Why is Bash reporting “command not found” in some cases in the Terminal but not in others?

Often, but not always, when I start the Terminal on my computer and use pipe (|) in a command, pbpaste | wc as an example, bash gives -bash:  wc: command not found. (The double space is not a typo). ...
1
vote
0answers
50 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 A?...
1
vote
2answers
561 views

pipe and stdin redirection to cat

Why does echo "hello world" | cat works while cat < echo "hello world" does not? My (incorrect) intuition is that pipe would redirect stdout to cat as stdin.
12
votes
3answers
6k views

Comments in a multi-line bash command

This single-command BASH script file is difficult to understand, so I want to write a comment for each of the actions: grep -R "%" values* \ | sed -e "s/%/\n%/" \ | grep "%" \ | grep -v " % " \ | ...
0
votes
2answers
93 views

Why can't I redirect output from awk?

I've written this one liner to show MB read/written every 5 seconds. #!/bin/bash #iosum.sh iostat -dmz 5 |\ awk 'BEGIN{rx=wx=0}{if($0 == ""){printf"%.1f %.1f\n",rx,wx}else if($0~/^Device:/){rx=wx=...
4
votes
2answers
2k views

Setting pipefail for a single piped command

I need to execute a number of piped shell commands from a non-BASH script (namely PHP script) like these: command1 | command2 | command3 so that, if command1 fails with a non-zero exit code, each ...
0
votes
2answers
107 views

shell pipe back pressure similar to “pv”

I have shell file like this: grep 'INSERT INTO container' $file | mysql database -f Problem I have is MySQL gets too many inserts and it slow down a lot (database is mostly read-only and this is ...
0
votes
1answer
198 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 ...