Echo Write Error Broken Pipe
Contents |
communities company blog Stack Exchange Inbox Reputation and Badges sign up log in tour help Tour Start here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us line 148 printf write error broken pipe Learn more about Stack Overflow the company Business Learn more about hiring developers or cat write error broken pipe posting ads with us Ask Ubuntu Questions Tags Users Badges Unanswered Ask Question _ Ask Ubuntu is a question and answer grep write error broken pipe site for Ubuntu users and developers. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and
Ls Write Error Broken Pipe
rise to the top gnome-terminal starts with “grep: write error: Broken pipe” message up vote 3 down vote favorite I am running Ubuntu 14.04.3, it's uptodate. I don't know why, for a few days I began to take grep: write error: Broken pipe message on launching gnome-terminal . It seems to be harmless but it bothers me. How can I debug it? EDIT: I moved aliases and functions each ls write error broken pipe python to separate files such as .bash_aliases and .bash_functions and added a command to load them from .bashrc if [ -f ~/.bash_aliases ]; then . ~/.bash_aliases fi if [ -f ~/.bash_functions ]; then . ~/.bash_functions fi If I don't load .bash_functions problem disappears. I am trying to find the faulty one by disabling each function one by one. This one gives me the same error but when I disable it I keep getting the same error, so I may have more faulty functions. ls -lt $PWD| grep ^d | head -1 | cut -b 51- grep: development write error: Broken pipe I wonder why I begin to take that error. EDIT2: I found a similar problem here boken pipe The root of the problem also seems similar. I tried the given test command in the link which have the same error: bash -c '(while echo foo; do :; done); echo status=$? >&2' | head foo foo foo foo foo foo foo foo foo foo bash: line 0: echo: write error: Broken pipe status=0 EDIT3: Though that unbuffer workaround I posted below as an answer to my own question works, I am not satisfied with it, but my knowledge about debugging is limited. Acoording to this link https://lists.gnu.org/archive/html/bug-coreu
& Answers This forum is closed for new posts. Please post beginner questions to learn unix and learn linux in this forum UNIX for Beginners Questions & Answers Search Forums Show Threads Show Posts Tag Search Advanced Search Unanswered Threads Find All Thanked Posts Go write error broken pipe android to Page... learn linux and unix commands - unix shell scripting echo: write error: Broken pipe
Socketclient Write Error Broken Pipe
?? UNIX for Dummies Questions & Answers Thread Tools Search this Thread Display Modes #1 11-25-2010 andrewust Registered User
Dracut Cat Write Error Broken Pipe
Join Date: Nov 2010 Last Activity: 27 April 2011, 6:04 AM EDT Location: Hong Kong Posts: 20 Thanks: 14 Thanked 0 Times in 0 Posts echo: write error: Broken pipe ?? I want to try the unix pipe, the command is like this: http://askubuntu.com/questions/733484/gnome-terminal-starts-with-grep-write-error-broken-pipe-message echo new | find . the standard output of the echo should be "new", then I guess find command will use this output as input to find the file named "new". But the output is all the file names in my current dir, the last line is "echo: write error: Broken pipe". Can anyone kindly tell me why this is happening? Thanks. Remove advertisements Sponsored Links andrewust View Public Profile Find all posts by andrewust #2 11-25-2010 jim mcnamara ...@... Join Date: http://www.unix.com/unix-for-dummies-questions-and-answers/149108-echo-write-error-broken-pipe.html Feb 2004 Last Activity: 9 October 2016, 11:34 AM EDT Location: NM Posts: 10,830 Thanks: 449 Thanked 968 Times in 899 Posts find does not read input from a pipe. That's why you got the error. Code: find . -name new assuming that new is real file name you expect to find. There is no "new" predicate for the find command. How about this Code: ls | grep 'a' This finds all the files with the letter a in the filename in the current directory. The Following User Says Thank You to jim mcnamara For This Useful Post: andrewust(11-26-2010) Remove advertisements Sponsored Links jim mcnamara View Public Profile Find all posts by jim mcnamara #3 11-26-2010 andrewust Registered User Join Date: Nov 2010 Last Activity: 27 April 2011, 6:04 AM EDT Location: Hong Kong Posts: 20 Thanks: 14 Thanked 0 Times in 0 Posts Quote: Originally Posted by jim mcnamara find does not read input from a pipe. That's why you got the error. Code: find . -name new assuming that new is real file name you expect to find. There is no "new" predicate for the find command. How about this Code: ls | grep 'a' This finds all the files with the letter a in the filename in the current directory. I see. Thanks a lot. Is there any other command which does not accept input from pipe? andrewust View Public Profile Find all posts by andrewust #4 11-26-201
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and http://stackoverflow.com/questions/11454309/piping-two-bash-commands-in-r-broken-pipe-error policies of this site About Us Learn more about Stack Overflow the http://stackoverflow.com/questions/20573282/hudson-yes-standard-output-broken-pipe company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes write error a minute: Sign up Piping two bash commands in R: broken pipe error up vote 4 down vote favorite 1 I'm trying to pipe two bash commands in R but I get a broken pipe error; any suggestion is appreciated. Here's where I am: #Create a long file (2GB on your drive...) write.csv(rep(1,1E8),file="long.txt", row.names=FALSE) system("grep 1 tmp.txt") #This works system("grep 1 write error broken tmp.txt| head -n 10") #This gives a broken pipe error I get grep: writing output: broken pipe With a short file it works properly. How can I work arround that please? Thanks. r bash pipe share|improve this question asked Jul 12 '12 at 14:40 ILoveCoding 314214 Do you get the broken pipe error when you do the same thing on the command line? –Jay Sullivan Jul 12 '12 at 14:45 no, it's running perfectly. –ILoveCoding Jul 12 '12 at 14:47 add a comment| 2 Answers 2 active oldest votes up vote 6 down vote grep is complaining because it has more output than 10 lines, and head is cutting it off before it finishes. I suggest hiding grep's stderr output (this is where the broken pipe error is printed). system("grep 1 tmp.txt 2>/dev/null | head -n 10") This won't work if you need to see other errors from grep; in that case, you will need a more complicated solution. share|improve this answer answered Jul 12 '12 at 16:37 mrb 2,3191921 Thanks this is usefull (will
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Hudson : “yes: standard output: Broken pipe” up vote 11 down vote favorite 1 I need to run a shell script in hudson. That script needs an answer from the user. To give an automatic answer I did the following command line : yes | ./MyScript.sh This works well in Ubuntu terminal. But when I use the same command in the Hudson job, the script will be automated and do all the needed work, but at the end, I get these two lines of error : yes: standard output: Broken pipe yes: write error And this causes the failure to my Hudson job. How should I change my command line to work well in Hudson? Thank you. shell ubuntu jenkins hudson pipe share|improve this question edited Dec 19 '13 at 18:24 asked Dec 13 '13 at 18:16 Farah 66421229 add a comment| 4 Answers 4 active oldest votes up vote 15 down vote accepted +50 But how would you explain that I dont get this error while running the script locally, but I get the error when running it remotely from a Hudson job? When you are running it in a terminal (locally); yes is killed by SIGPIPE signal that is generated when it tries to write to the pipe when MyScript.sh has already exited. Whatever runs the command (remotely) in Hudson traps that signal (set its handler to SIG_IGN, you can test it by running trap command and searching for SIGPIPE in the output) and it doesn't restore the signal for new child processes (yes and whatever runs MyScript.sh e.g., sh in your case). It leads to the write error (EPIPE) instead of the signal. yes detects the write error and reports it. You can simply ignore the error m