A pipe is a form of redirection that is used in Linux and other Unix-like operating systems to send the output of one program to another program for further processing.

learn more… | top users | synonyms

1
vote
1answer
27 views

Why use a named pipe instead of a file?

I recently read about named pipes, and I couldn't understand why they exist. I've read somewhere that using a named pipe is less time-consuming than using a file. Why is this so? The named pipes also ...
3
votes
2answers
37 views

How can I pipe the output of “find” to “cd”?

What should I do to search for a file in list of folders and change current directory to the directory of the file? I tried find -name script.py | cd but it did not work (not that I was expecting it ...
0
votes
0answers
27 views

Ubuntu broken pipe on suspend [closed]

On my Ubuntu computer, I am trying to suspend. But, when I suspend, the screen goes black for a second and then flashes a "could not writes: Broken Pipe" error message. Restart and Shutdown are still ...
0
votes
1answer
40 views

Error when boot: Could not write bytes: broken pipe

Good day, I see there are various questions about the same topic but it looks like the cause are somewhat different. I tried tor resolve my problem by looking and trying some of the solutions but ...
0
votes
1answer
18 views

Piping into GraphicsMagick

I'm still learning the command line, and I'm having trouble piping a list of files into graphicsmagick for conversion to pdf: find . -type f | sort | gm convert file.pdf This gives the error: gm ...
2
votes
2answers
48 views

Cat to named pipe causes hang

I'm attempting some streaming with FFMpeg, and I think I have finally found the solution I need to screen blanking. This requires writing PNG's to a named pipe and then having FFMpeg read them as an ...
1
vote
1answer
73 views

How to capture all visited URLs on the command line?

I like to get all URLs I visit in the browser live captured on the command-line for piping them to another program. How would I be able to do this? The format should be just one URL per line, nothing ...
1
vote
3answers
45 views

Trying to figure out what the command mean

Please explain me what does this command mean: wget -qO- https://toolbelt.heroku.com/install-ubuntu.sh | sh wget - use wget to download something -qO- first argument is -q, but what does 0- mean? ...
0
votes
1answer
17 views

Named pipes always open for writing

I want to make a named pipe that is always open for reading and writing. So I typed this in to the terminal: mkfifo testpipe exec 3<> testpipe All is working correct. But when I make a shell ...
0
votes
1answer
36 views

Uncompress and pipe the output to script

I have a script that takes an input with a -i flag. The input file I have is compressed (.gz). What I want to do (not sure it's possible), because the file is huge, do some thing like this: gunzip -c ...
0
votes
0answers
29 views

how to setting pip.ini to use cert

How to setting pip.ini to use cert for each link/url/find-links, example: find-links = http://x.y.z/simple/ cert = xxx.pem http://a.b.c/simple/ cert = sss.pem ...
1
vote
1answer
55 views

piping using ssh without having to relogin for every pipe

I have an ssh connection and I have to send some local files and output to the ssh server. I know I can do this using the following command tar zcf - stuff | ssh user@server 'tar zxf -' I would ...
1
vote
0answers
96 views

Firmware 1.79.9 Package Install operation failed

When I tried to update Ubuntu through Update Manager, all other updates are installed. One update was downloaded but not installed. I tried again and again but error cannot be fixed. I get the ...
0
votes
0answers
66 views

updated xserver and now I get a black screen / cannot write bytes: broken pipe

I got a new CINQ monitor for my laptop and I tried following the instructions at http://how-to.cc/get-a-displaylink-video-adapter-working-with-ubuntu-12-04 for updating the necessary drivers. I ...
1
vote
1answer
40 views

Copy all files whose hashes don't match

I currently have a hash list (known good) of a selection of various files. I want to copy all files when their hashes do not appear in the hash list to a separate directory. I have got the md5deep ...
1
vote
1answer
40 views

help understand diff between: sort < file.txt VS file.txt | sort

so im learning Ubuntu (for the first time) and am reading trough Ubuntu server book chapter 14 says filename.txt | sort will give me an output with the content of the file, but sorted HOWEVER it ...
0
votes
1answer
78 views

When piping output to a file, why are stderr and stdout in the wrong order?

I have a perl script: warn "1\n"; print "2\n"; warn "3\n"; print "4\n"; I pipe the output to a file: perl script.pl &> foo cat foo: 1 3 2 4 Why isn't the output in order, and how do I ...
0
votes
3answers
1k views

Cant login, Broken Pipe?

Okay, so I'm really stuck on this one. So yesterday wile I was playing Kerbal Space Program, the game crashed, so I did a hard shutdown (holding the power button). When I turned it on, it booted just ...
0
votes
1answer
428 views

I can't upgrade 13.10 because of broken pipe

I try upgrading and this is what I get: christopher@chris-computer:~$ sudo apt-get upgrade [sudo] password for christopher: Reading package lists... Done Building dependency tree Reading ...
2
votes
1answer
94 views

Space (and pipe sign) works on occasion only

I have an issue that when I try to write pipe sign "|" and space after that, I sometimes get wrong type of space (\240) and my command fails. This issue persists on different shells. How could I fix ...
0
votes
1answer
41 views

Read only n first lines from something

When I'm saying something like curl http://example.com/123 and I want to read only n first lines, how do I do that? I know that's something like: curl http://example.com/123 | ???
0
votes
1answer
19 views

Mail on an error

I would like to be notified by email whenever my web-application does an error. In this link, someone says that "Guys, just pipe ~/.pm2/logs/*.err to your favourite mailer, all data are there.". I ...
3
votes
0answers
3k views

Can't boot Ubuntu 12.04 “Could not write bytes: broken pipe”

SYSTEM: 4GB RAM; 500GB DISK I have tried some of the solutions I have seen about this error and none have helped. Here is the history: 1. I have been running 12.04 LTE for about a year now with no ...
3
votes
1answer
149 views

When shuting down a black screen with a broken pipe message shows for half second

It is actually very fast when it shows, I had to record it to actually saw what it said and it is: could not write bytes: Broken pipe Checking battery state... cpid: exiting Checking for running ...
0
votes
3answers
473 views

I can't install valgrind due dpkg-deb broken pipe, how to fix this? [duplicate]

hanu@hanu-HP-Pavilion-Sleekbook-14:~/raijin/build_debug$ sudo apt-get -f install Reading package lists... Done Building dependency tree Reading state information... Done Correcting ...
1
vote
2answers
306 views

Problem IN piping the output of one command to other

I want to recursively sort all the file in the present directly. I tried ls -lh -R |sort >> output.txt. But i think multi-threading problem is creating a problem, before complete output of ls ...
4
votes
2answers
138 views

How can I use the value from a pipe in the test program?

wc -l | test -eq 1 This doesn't work. I want to compare the result of wc with the value of 1. How can I do that?
3
votes
1answer
36 views

REGEX behaves differently!

When running the following echo "abc>asf<tfg"|sed 's/.*>\(.*\)</\1/' The output is: asftfg I don't understand why tfg gets printed? My expected result is asf. Though, it works ...
2
votes
1answer
207 views

Pipe an infinite stream to internal loop?

I've seen a lot of things about redirecting stdout to a TCP socket, but no real example of how to do it in practice, specifically when the output stream generated by the first "command" never ends. ...
0
votes
0answers
438 views

Ubuntu 12.04 broken pipe?

For some reason I get broken pipe errors and then logged out to the login screen. The occurrences seem sort of random or at least what triggers it, although I think this is only because I haven't ...
0
votes
0answers
18 views

Where can i get a complete list of pakages in ubuntu desktop live cd [duplicate]

I want to purge unnecessary packages from .iso file of ubuntu, so i am looking for a complete list of programs included in default installation. I tried dpkg-query -W ...
10
votes
1answer
639 views

What does this “… | ps `cat`” command do?

On my Internet research, I found the following command as solution to find the process name of a window: xprop _NET_WM_PID | sed 's/_NET_WM_PID(CARDINAL) = //' | ps `cat` I just do not understand ...
0
votes
1answer
192 views

update followed by “broken pipe”, read-only disks, and error

Yesterday night I did an apt-get update and installed some updates (unfortunately I didn't really pay attention to what I've installed). This morning when I switch the laptop on, it couldn't boot and ...
1
vote
1answer
271 views

Search files in subfolder and export results to file

I have a folder with hundreds of subfolders. I need to locate recursively within the subfolders those that don't have certain files inside (for instance *ch.pdf or *.jpg) and export the results to a ...
3
votes
1answer
103 views

How to avoid delay in output stream pipe

While i pipe nethogs it takes too much delay for the output ( About 5-200 sec instead of 1 sec depend on pipe,cmd etc). Nethogs print output in every second. For the sake of simplicity consider the ...
1
vote
0answers
54 views

cp hangs on certain Windows files

I am currently trying to use Ubuntu 9.04 live CD (it's what I had when my computer took a dump) to copy some Windows files from an old drive to a new drive. I'm using cp -Rvf source dest. The issue ...
2
votes
2answers
315 views

use output from alias command as filename to open in vi

I set up an alias this morning to help finding the latest log file in a directory. My alias looks like alias latest="ls -lat | grep ^- | awk '{print \$8}' | head -1" In my research so far this ...
4
votes
3answers
10k views

Kill Java processes

I'm working on a computationally heavy code that - for now - crashes a lot, but I'm still working on it :) When it crashes, I can't close the GUI window; I have to open a shell and kill -9 the ...
4
votes
2answers
597 views

Converting Celsius Processor Temperature to Fahrenheit

I'm editing a Conky theme. I would like it to output the processor temperatures in degrees Fahrenheit instead of Celsius. In the ~/.conkyrc file, the command sensors | grep 'Core 0' | cut -c18-19 is ...
3
votes
1answer
2k views

How to output avconv with pipe

I am trying to pipe an output from avconv to grep but somehow the pipe is not working correctly. The following ways are not working: avconv -i MOVIE.mkv | grep SOMETHING - Which should show only the ...
13
votes
1answer
3k views

How do I pipe terminal standard output (stdout) to the clipboard?

For example, Say I want to list the contents of a folder and directly paste them into a chat window for a friend to see. I realize I could do ls > filename.txt to create a file (filename.txt) ...
2
votes
2answers
1k views

Write bash script which takes input from pipe

I am always typing things like this: cat some_list_of_elements.txt | awk '{print "\047"$1"\047"}' | paste -d, -s It takes a list of items from a file, wraps each in quotes, and merges them together ...
11
votes
4answers
6k views

What is the difference between “Redirection” and “Pipe”?

This question may sound a bit stupid, but I can not really see the difference between redirection and pipes. Redirection is used to redirect the stdout/stdin/stderr, e.g. ls > log.txt. Pipes are ...
3
votes
4answers
454 views

How to use pipes to reference stdout of a command from within the stdin of another?

I am trying to understand how to use the stdout as the stdin of another command. To test it, I am trying to use the following command to delete all directories from the current folder. ls -d -- */ | ...
1
vote
2answers
1k views

How do I create a new text file with a new name from a phpscript everytime it is executed

I use a Php script which is actually for sending sms from the terminal using an online sms service 160by2 What it does is opens the terminal,asks for the number then the sms and it is sent... Now i ...
4
votes
1answer
166 views

using pipe with bundle show and gnome-open

(I asked an almost identical question on stackoverflow with no response. Am hoping that ask ubuntu is a better spot for this and so am re-asking here.) I haven't used pipe much and am wondering if ...
1
vote
1answer
3k views

How can I backup and encrypt with tar, split and openssl, all in one command?

I often use tar to backup my stuff in 4 gigabyte chunks to a directory on a FAT32-formatted disk, as documented here. To get that done, I use the following command: tar -cvpj /path/to/directory/ | ...
3
votes
1answer
355 views

Pipable command to print in color?

I'm a bit new to bash scripting, and I'm wondering if there is a program or built-in command to pipe to that will print in a specified color? Or is there an echo argument to do so? Like I could do: ...
1
vote
1answer
358 views

Pipe BIND9 logs to a shell.php script

I am trying to extract some data from BIND9's query log. I like to pipe the queries to a script first and then parse it, then log it. How do I do this? Please help. logging { channel simple_log ...
1
vote
1answer
2k views

output terminal redirect to zenity

Let's explain you my doubt. We all know that >& is shell syntax for "fold a file descriptor into another". So 2>&1 means that i want to redirect stderr to the stdin, this is simple and ...