Bash Type 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 cat write error broken pipe Meta Discuss the workings and policies of this site About Us Learn grep write error broken pipe more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us ls write error broken pipe Ask Ubuntu Questions Tags Users Badges Unanswered Ask Question _ Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a
Ls Write Error Broken Pipe Python
minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top cat: write error: Broken pipe up vote 2 down vote favorite I'm running a command: cat urls.txt | xargs -L 1 -P 5 timeout 40 wget This downloads all the URLs in urls.txt echo write error broken pipe This used to work fine, but recently I changed the URLs I am downloading from something like: domain.com/54f-5g4/ to something like domain.com/this-that/ And for some reason I am now getting: cat: write error: Broken pipe I've looked at the commands being executed and they all look fine, i.e. no unescaped characters. Does anyone have any idea what the problem may be? Or how to get more debugging information? I believe the problem is with commands after the pipe. Update: I found the error. It looks like I accidently typed a ' in my urls.txt file. If you are getting this error, you have a problem with your command after the pipe. bash command-line cat share|improve this question edited Feb 16 '14 at 14:35 asked Feb 16 '14 at 14:29 Kohjah Breese 5592923 2 Correct me if I'm wrong.. If your purpose is to download whatever specified on that urls.txt file; well you can simply use wget -i urls.txt :) –AzkerM Feb 16 '14 at 16:35 wget only allows one connec
Search HCL Search Reviews Search ISOs Go to Page... LinuxQuestions.org > Forums > Linux Forums > Linux - Server bash scripting sending "cat: write error: Broken pipe," User Name Remember Me? Password Linux - Server This forum is write error broken pipe android for the discussion of Linux Software used in a server related context. Notices Welcome to
Socketclient Write Error Broken Pipe
LinuxQuestions.org, a friendly and active Linux Community. You are currently viewing LQ as a guest. By joining our community you will have
Dracut Cat Write Error Broken Pipe
the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today! Note that registered members see http://askubuntu.com/questions/421663/cat-write-error-broken-pipe fewer ads, and ContentLink is completely disabled once you log in. Are you new to LinuxQuestions.org? Visit the following links: Site Howto | Site FAQ | Sitemap | Register Now If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here. Having a problem logging in? Please visit this page to clear all LQ-related cookies. Introduction to Linux - http://www.linuxquestions.org/questions/linux-server-73/bash-scripting-sending-cat-write-error-broken-pipe-802943/ A Hands on Guide This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter. For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own. Click Here to receive this Complete Guide absolutely free. Search this Thread 04-19-2010, 05:39 PM #1 rojoblandino LQ Newbie Registered: Nov 2007 Distribution: SuSE Debian Posts: 22 Rep: bash scripting sending "cat: write error: Broken pipe," I move a page from a server in Suse to Debian and this script was working well but when i move the page to a Debian base server it is sending in the logs the following message: cat: write error: Broken pipe, referer: http://domain.example/cgi-bin/search.sh the cgi does the following, read a db file plain text that repeat each 15 lines an information where to look the seraching info. if
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 http://stackoverflow.com/questions/11454309/piping-two-bash-commands-in-r-broken-pipe-error posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss https://bugzilla.redhat.com/show_bug.cgi?id=78946 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 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 write error 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 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 304213 Do you get the broken pipe error when you do the write error broken 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 vote you up when I have enough points!) but is extremely slow: the command takes more than a min to run, while it's instantaneous in bash... –ILoveCoding Jul 12 '12 at 17:32 I'm not familiar with R, but I don't see any reason why it would be any slower if you're running the exact same command in both places. It probably won't help, but you can also try: system("bash -c 'grep 1 tmp.txt 2>/dev/null | head -n 10'") which will force system to use bash (in case it's using something else). –mrb Jul 12 '12 at 17:36 no better; as expected. –ILoveCoding Jul 12 '12 at 17:48 Shouldn't head be sending a SIGPI
Printing -XML -Clone This Bug -Last Comment First Last Prev Next This bug is not in your last search results. Bug78946 - Broke pipe error while piping output out STDOUT Summary: Broke pipe error while piping output out STDOUT Status: CLOSED WORKSFORME Aliases: None Product: Red Hat Linux Classification: Retired Component: tcsh (Show other bugs) Sub Component: --- Version: 8.0 Hardware: i686 Linux Priority medium Severity medium TargetMilestone: --- TargetRelease: --- Assigned To: Miloslav Trmač QA Contact: Docs Contact: URL: Whiteboard: Keywords: Depends On: Blocks: Show dependency tree /graph Reported: 2002-12-03 15:52 EST by hongxianhe Modified: 2007-04-18 12:48 EDT (History) CC List: 0 users See Also: Fixed In Version: Doc Type: Bug Fix Doc Text: Story Points: --- Clone Of: Environment: Last Closed: 2004-08-19 14:08:08 EDT Type: --- Regression: --- Mount Type: --- Documentation: --- CRM: Verified Versions: Category: --- oVirt Team: --- RHEL 7.3 requirements from Atomic Host: Cloudforms Team: --- Attachments (Terms of Use) Add an attachment (proposed patch, testcase, etc.) Groups: None (edit) Description hongxianhe 2002-12-03 15:52:09 EST From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020830 Description of problem: When I run "grep" command, and pipe the output to stdout to see part of the returned result, I always get the following error: cassiopeia 97% grep '>target' HG-U95A_target | head grep: writing output: Broken pipe grep: writing output: Broken pipe grep: writing output: Broken pipe grep: writing output: Broken pipe grep: writing output: Broken pipe grep: writing output: Broken pipe grep: writing output: Broken pipe grep: writing output: Broken pipe (...repeat many many times) If I pipe the output to a file, it works fine. Or when I switch to bach, it also works. Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1.grep a frequently appeared word from a long file and pipe it to `head` command Actual Results: grep: writing output: Broken pipe grep: writing output: Broken pipe grep: writing output: Broken pipe grep: writing output: Broken pipe grep: writing output: Broken pipe grep: writing output: Broken pipe grep: writing output: Broken pipe grep: writing output: Bro