Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

capturing stderr of echo piped to a file

by cebundy (Novice)
on Oct 28, 2014 at 19:10 UTC ( [id://1105354]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
        my $file = "/mnt/adtest/qa1/file1";
        my $writeline = "# $test->{currentuser} wrote timestamp " . time()
    +;
        my $command = "echo $writeline >> $file";
        my $output = `$command 2>&1`;
    
  2. or download this
    [root@qanode1-2 latest]# echo "qauser1 wrote timestamp 1414118740-1" >
    +> /mnt/adtest/qa1/file1
    -bash: /mnt/adtest/qa1/file1: Permission denied
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1105354]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (9)
As of 2024-04-18 16:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found