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

5
votes
1answer
5k 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 ...
3
votes
3answers
2k 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
3k 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
408 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
207 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
495 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
176 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
94 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
10k 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
400 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
2k 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
616 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 > ...
1
vote
1answer
534 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
734 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.?
8
votes
2answers
3k 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
368 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?
13
votes
2answers
5k 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 ...
8
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
171 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
154 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
689 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
326 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
226 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
203 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
1k 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
3k 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
957 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
343 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
214 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
168 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
341 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
1k 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
545 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
92 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
418 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
567 views

How to find the last match of a string in a bunch of files

I have a bunch of files, I'd like to find the last match of a string in each of them. grep text *.file gives me all the matches not the last ones. ls *.file | xargs grep text | tail -n 1 gives me ...
0
votes
2answers
932 views

Preserve colors while piping to tee

ls -l --color=auto | tee output.log Without pipe/tee it's colored. How can I make it so that it stays colored while using tee (can be colored only on the screen, I don't care about colors in logs).
1
vote
2answers
669 views

File name with spaces piped to two xargs commands

I have a directory and many more subdirectories like the following - file with spaces.txt filewithsuperlonglines.txt ordinaryfile.txt binaryfile.bin The command - find . -type f -print0 | ...
0
votes
1answer
684 views

“find | grep | awk” fails miserabily

I'm scanning for all shell scripts on my server, and are doing this by the following command: find / -type f -exec file --mime-type {} \; | grep "text/x-shellscript" This is working fine, and here ...
5
votes
3answers
3k views

How can I specify command line arguments using pipes in Linux?

I'm a newbie to shell programming and have no idea how to solve this problem. I just downloaded a file from the Internet to the default directory ~/Downloads. I want to move that file to another ...
0
votes
1answer
146 views

exec command “who”: Broken Pipe && “ps”:bad namelist

I typed "who" under Freebsd4.5, the information showed as below: stdout: Broken pipe ...... but showed "test ttyp0 Sep 20 20:39 (192.X.X.8)"last line. and exec command ps, it returns ...
3
votes
1answer
2k 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?
1
vote
2answers
6k 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 ...
5
votes
1answer
2k views

extract a few members from tar archive and pipe through network

edit: I want to extra member01 and member02 and directory blah/ tarball_1.tar.gz contains directory test/ with 20 files. I want to extract only member test/member01 and test/member02 and directory ...
3
votes
3answers
2k views

How can I grep in source files for some text?

At the moment I'm using two commands, I'm sure there must be a better way... wim@wim-acer:~/ffmpeg$ find . -name "*.h" -print0 | xargs -0 grep -i invalid\ preset wim@wim-acer:~/ffmpeg$ find . -name ...