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
28 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
vote
1answer
16 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-) ...
0
votes
2answers
34 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 ...
0
votes
1answer
9 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
36 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
38 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 ...
0
votes
0answers
24 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 ...
1
vote
1answer
52 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
39 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 ...
1
vote
2answers
94 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.
0
votes
2answers
47 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 ...
0
votes
2answers
47 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
74 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 ...
4
votes
2answers
220 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 ...
0
votes
1answer
32 views

XTerm buffers output when reading from fifo

I have an xterm window that I would like to continually display the output of a named pipe. However, there seems to be some buffering occurring, and I can't find where it is happening. I open two ...
3
votes
2answers
34 views

Pipe the xkcdpass Ouput as file to another script

I have a script that needs a file as argument : ./myscript --file filename.txt xkcdpass generates lists of passphrase as output . How can I PIPE the output of xkcdpass , as a file, to myscript ...
0
votes
0answers
64 views

Unable to trim piped video stream with FFmpeg

Trying to trim a video file that gets piped from the standard input, it only works when the start duration is greater than 2.0s for some videos (fails for ones captured from an Android phone to be ...
7
votes
3answers
1k views

Why are not all files compressed and how to improve the solution

I have a folder with about 20K files. The files are named according to the pattern xy_{\d1,5}_{\d4}\.abc, e.g xy_12345_1234.abc. I wanted to compress the first 10K of them using this command: ls | ...
0
votes
2answers
173 views

DD Bash backup issues - “unrecognized operand”

I’m using the Datto Block Driver to take snapshots of my running server every night. After the snapshot is taken, I dd the snapshot from /dev/datto0 through PipeViewer (pv) and gzip to a file on the ...
0
votes
1answer
33 views

Use disk-backed buffer between pipes

I'd like to pipe a command into a slower one, with a rather big (~200GB) buffer in between. Here is an example use-case: command1 | buffer -f file.buffer | command2 Is there a command to do that? ...
0
votes
1answer
68 views

Pipe string to a command with multiple read prompts

How can I pipe a string to a command with multiple read prompts in OS X? I am running a command for a Parallels VM to enable a password which prompts for multiple values (without running a secondary ...
0
votes
0answers
16 views

Piping back resulting stream from split remote commands

I'm trying to perform the following: (1) generating data on my local workstation (2) piping this data (huge amount!) once to my remote speedy server (3) performing two separate operations on this ...
1
vote
1answer
68 views

Run commands from a pipe in realtime

If I have a pipe like cat /dev/somedevice | grep 'test' that output commands, like for example echo 'test 17', the commands appear in realtime (everytime /dev/somedevice delivers some line). If I ...
3
votes
1answer
181 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 ...
2
votes
1answer
95 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
47 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
45 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
26 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
85 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
121 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
133 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
732 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
446 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
28 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
400 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
84 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
230 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
1answer
33 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
133 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
483 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
102 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
382 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
1k 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
24 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
78 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
230 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
58 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
94 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
2answers
62 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
43 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 ...