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

2
votes
1answer
74 views

.cmd script output only goes to pipe occasionally

I'm having a problem with a .cmd script only occasionally passing it's output through a pipe. The script is auto generated by npm and it runs jshint using node. Here's the script: :: Created by npm, ...
2
votes
2answers
815 views

Piping bash output to perl script's arguments

I have the following bash command: find repo -name '*.c' What I want to do is use the files returned as arguments to my perl script, so that it's equivalent to running: perl ./myscript file1.c ...
4
votes
1answer
103 views

Launch only the command if the previous one worked inside SSH, shell

I've got a SHELL script which is using a pipe to separate my two commands: ssh -oBatchMode=yes user@hostname "mysql -u yop -pyop -c yop | echo test" The problem is even if my connection to MySQL ...
2
votes
2answers
2k views

How do I unzip a compressed file as it's downloading?

I'm downloading a large file that's not an archive, and I want to combine the tasks of downloading and decompressing. How can I do them simultaneously?
2
votes
3answers
233 views

With regards to piping commands, what are the greater than (>) and less than (<) symbols called?

On linux at least, and I think windows/dos shell too you can use > to "pipe" output into a file. Something like: cat myfile.txt > mightAsWellCP.txt What is that piece of syntax sugar called? ...
2
votes
1answer
722 views

Unix bidirectional pipe on commandline

I've been able to use this linux command to connect Netcat to a serial port: nc -l 80 <> /dev/ttyS0 I would like to be able to log this transaction. My backup plan is to use Wireshark to ...
3
votes
2answers
391 views

How can I run several parallel shell jobs and monitor all of them at once?

I have a large number of large files (hundreds of files, hundreds of MB each) which I need to pipe through a number of programs to filter and convert them. I'm taking advantage of multiple CPU cores ...
0
votes
2answers
3k views

pipe: too many files open renders entire OS completely useless

I'm running Ubuntu 12.04, and I am having a major problem. Two separate times today, one of my open gnome-terminal sessions locked up and printed the error pipe: too many open files I realize ...
0
votes
1answer
801 views

Transcode moviefile to h264/aac with ffmpeg for video and neroacenc for audio

I'm on Mac OS 10.8.1, with ffmpeg-devel installed as a macport. I can run NeroAacEnc(win32) via Wine. I can transcode a movie into h264/aac using a simple ffmpeg command: ffmpeg -i INPUT.MP4 -vcodec ...
2
votes
3answers
738 views

count files in a list of directories

I have file with a list of directories that I would like to know how many files are in each directory. .../images/idsuffix/userids/ This will give me the count of files and directories for ...
5
votes
1answer
6k views

What are reasons for local Windows named-pipes to fail?

I've been working hard on this one all day and I'm stuck. This morning our asian collegues called me because a SolidWorks addin for our product data management system could not communicate with the ...
5
votes
3answers
3k views

Can I use pipe output as a shell script argument?

Suppose I have a bash shell script called Myscript.sh that need on argument as input. But I want the content of the text file called text.txt to be that argument. I have tried this but it does not ...
1
vote
1answer
4k views

How to connect to Ubuntu using Serial Port?

I am using VMware and I want to connect to Ubuntu VMs via serial port. I am connecting both using pipe as referred in this website https://www.vmware.com/support/ws3/doc/ws32_devices3.html How do I ...
1
vote
3answers
4k views

Silence curl with >/dev/null 2>&1 when it's piped

So I have a curl that is piped to a grep and a sed. Where would I apply the >/dev/null 2>&1 ? curl www.site.com | grep stuff | sed "other stuff" At the very end or after the curl?
5
votes
1answer
480 views

Locked out of host after reaching some ulimit

So, I have a sudoer account in a remote host, in which I create a process with thousands of threads and sockets. The thing is, if I create too many threads/sockets (not sure which one, it might even ...
2
votes
1answer
242 views

Do people use dbus, pipes or ports usually for interprocess communication? [closed]

It's hard to find dbus libraries for the programming languages I've been using though the idea looks neat. Sockets are the most supported way but it also eats one of my computers ports and then I also ...
1
vote
2answers
616 views

Bash: Concatenating TAR balls

Is it valid to do this: { tar -c dir1 tar -c dir2 } | cat > file.tar Is the resulting file.tar a valid tar ball? If not, how can I concatenate tar balls on the fly?
0
votes
1answer
186 views

Pipe multiple commands to single grep

I'd like pipe the output of multiple commands to a single grep. Example: I'd like to combine these two lines: smartctl -A /dev/sda | grep -e Reallocated_Event_Count -e Current_Pending_Sector ...
1
vote
1answer
107 views

Why Does Issuing One lsof Launches Two Processes?

I'm on current OS X 10.7. Sometimes I want to check which application locks a certain file. I do that by lsof | grep $FILENAME I noticed that running this command invokes two instances of lsof. Why ...
3
votes
2answers
12k views

In windows, can I redirect stdout to a (named) pipe in command line?

Is there a way to redirect the standard output of a process in Win32 console to a named pipe? Named pipes are built in to Windows and while they would be an useful concept, I've never seen them used ...
3
votes
2answers
458 views

How can I retain grep's match highlighting when piping find into grep?

If I run grep foo bar.txt, grep highlights each occurrence of "foo" in bar.txt. But sometimes I want to use find to determine which files grep searches. So I do something like this: find . -iname ...
2
votes
1answer
1k views

multiple png images over a single pipe to ffmpeg (no file writes to disk!)

I have a program that generates a script for gnuplot, which in turn generates a lot of png images and send it to stdout. I want to pipe these images to ffmpeg without writing them to the disk. This is ...
6
votes
5answers
3k views

How to get both PIPESTATUS and output in bash script

I'm trying to get last modification date of a file with this command TM_LOCAL=`ls -l --time-style=long-iso ~/.vimrc | awk '{ print $6" "$7 }'` TM_LOCAL has value like "2012-05-16 23:18" after ...
16
votes
2answers
1k views

What is the magic separator between filenames in ls output?

The output of ls (with no arguments) appears to separate filenames with linebreaks. Evidence: ls | grep foo works as expected, with grep treating each filename as a separate line of input. ls > ...
1
vote
1answer
693 views

How to open the stdout with Notepad++?

On OSX TextMate have the alias mate which you can use with the pipe to open other program's stdout. How can I achieve the same effect in Windows 7 with Notepad++? Ex.: git diff master|edit
1
vote
2answers
1k views

How can I clear the contents of every file in a subdirectory without changing ownership / permissions?

I can find the list of files using something like: find /path/to/files -type f And I can clear the contents of a single file with any of: > filename echo -n > filename cat /dev/null > ...
2
votes
1answer
615 views

How to pipe output of tail -F on OS X?

I've recently moved from Ubuntu to OS X and I'm finding that the 'tail' command behaves differently. On Ubuntu I could run tail -f xyzzy.log | espeak (To have the computer read me what's happening ...
4
votes
2answers
859 views

Is there any way to keep text passed to head, tail, less, etc. to be colored?

Is there any way to keep colorization of text passed through pipe | to head, tail, less, etc.?
9
votes
2answers
4k views

Why does Powershell silently convert a string array with one item to a string

Consider the following Powershell script, which searches for folders in C:\ with a 'og' in their name: PS C:\> (ls | %{$_.Name} | ?{$_.Contains("og")}) PerfLogs Program Files setup.log Now I ...
0
votes
1answer
495 views

Error 32 (Broken Pipe)

I bought a Crucial SSD and when trying to back up my 2009 MacBook Pro (13") to it I get the error 32 broken pipe message and it will not copy. Any suggestions?
15
votes
2answers
6k views

Pipe gunzip and mysql to gunzip a dump and import it

I have a .gz sql dump file (example: foo.sql.gz) that i want import in my database with the classic mysql command. gunzip -c foo.sql.gz > foo.sql mysql -uroot -ppassword foo < foo.sql foo is ...
14
votes
1answer
3k views

Find what process is on the other end of a pipe

I'm trying to trace some odd behavior of a few processes and ran into a point I'm not sure how to trace past. The hung process, which I attached to using strace -p showed this: Process 7926 attached ...
1
vote
3answers
181 views

Piping file to a command that doesn't implement piping

$ cat foo foo bar Now if I do: $ some_program foo It's working. But if I try: $ cat foo | some_program It's not working. I'm looking for a clean way to pipe input to some_program without ...
1
vote
1answer
168 views

redirecting output from several piped commands

This works: find . -type f | xargs md5sum | sort This does not and gives several "md5sum: xyz not found" errors: ( find . -type f | xargs md5sum | sort ) >~/md5.txt Same for: find . -type f ...
2
votes
5answers
772 views

Truncate file in a pipe

Is there a simple way to truncate a file in a pipe? Specifically, I want to chop of the last four bytes of a file before feeding it into another process. Ideally, I'd be able to write something like: ...
2
votes
1answer
343 views

UNIX approach to capturing video from webcam across a network

I have two Linux computers on a LAN (call them Foo and Bar), and I'd like to find a way to capture stream video from the webcam on Foo to Bar. I'd like to avoid using a GUI client which uses a ...
0
votes
1answer
238 views

how to redirect output of command line execution to more than one file according to weight of output

Currently I'm using an awk line to filter a set of files according to certain criteria. How can I redirect the result output to more than one file if the result, for example if the file that would ...
1
vote
1answer
215 views

How to give and pass input between separate programs?

There's so many individual, useful programs out there who's source code isn't available, some of which would integrate beautifully with each other! The only problem is I don't know how to enable ...
1
vote
4answers
2k views

less emulate a TTY to preserve piped color output

When you pipe something through less, the program usually discards color codes because it's not outputting to a TTY. So you have to add --color=always to the options for it to work. ls -l ...
3
votes
3answers
4k views

How to pipe awk output (with periodic, continuous input) to output file?

I am trying to write a command that pipes the continuous output of a free command (run every second) to an awk command that parses a specific value (available free memory) and outputs this to a file ...
1
vote
0answers
1k views

'No such interface supported' when attempting to compress file through 7zip commandline

When I run the 7zip commandline: > echo foo | 7za a arc.7z -sifoo.txt Everything works as expected, but if I try to do: echo foo | 7za a arc.zip -sifoo.txt I get the following: ...
2
votes
2answers
365 views

What's the best command to use to change a timestamp to readable date when 'tail -f'-ing a log file?

I have a program which logs like this: 1324218770.7644 INFO etc What's the best Linux shell program to pipe that through to change the timestamps to a human readable format like Sun 18 Dec 2011 ...
2
votes
1answer
228 views

how to convert a script using pipelines to named pipes

I have a bash script that is using anonymous pipes to achieve: grabbing video from dv capture device writing to a file (using tee) piping it to ffmpeg2theora (converting to ogv/theora video) writing ...
1
vote
1answer
174 views

How can I view the full exception thrown by a script in the shell?

When I'm running my ruby script, I'm getting an exception. However, since I'm running Ubuntu in VMware Fusion, I can't resize my terminal window so I can't see the whole excecption. How can I view ...
0
votes
3answers
374 views

How come piping yes to a file doesn't work?

I tried doing this: yes > yes.txt Afterwards, yes.txt is created but is completely empty.
0
votes
1answer
1k views

Unix pipe: find | ln -s

I'm trying to symlink some php files using the following command: find `pwd` -name "*.php" | ln -s * /home/frankv/www/bietroboter.de/symlinks However, all the symlinks are broken because the little ...
0
votes
2answers
2k views

How can I curl the output of another command

I want to pass curl the output from awk ./jspider.sh http://www.mypage.com | grep 'resource' | awk '{print $4}' | curl OUTPUT_FROM_AWK | grep myString How can I achieve this?!
1
vote
1answer
648 views

How to solve “Broken Pipe” error when using awk with head

I'm getting broken pipe errors from a command that does something like: ls -tr1 /a/path | awk -F '\n' -vpath=/prepend/path/ '{print path$1}' | head -n 50 Essentially I want to list (with absolute ...
0
votes
0answers
99 views

mutt colorizing piped messages

Viewing messages in mutt are colorized, but piping them through the less pager removes colorization. How do I preserve message colorization? I've tried: | less -R but colorization is stripped ...
1
vote
1answer
464 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. ...