Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Perl won't run command with "|&"

by aaron_baugher (Curate)
on Sep 19, 2013 at 22:45 UTC ( #1054917=note: print w/ replies, xml ) Need Help??


in reply to Perl won't run command with "|&"

You may be running csh as your shell, but perl appears to be using sh to run the command in backticks, according to the errors you're getting. I don't think sh has the |& syntax. This should combine STDOUT and STDERR and send the result to a file and to your backticks output:

`wget "http://whatever" 2>&1 | tee /path/to/tee.log`

Aaron B.
Available for small or large Perl jobs; see my home node.


Comment on Re: Perl won't run command with "|&"
Download Code
Re^2: Perl won't run command with "|&"
by italdesign (Novice) on Sep 20, 2013 at 13:28 UTC
    Thanks guys!

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1054917]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (10)
As of 2015-07-07 10:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (88 votes), past polls