Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

capturing stderr of echo piped to a file

by cebundy (Novice)
on Oct 28, 2014 at 19:10 UTC ( #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? | Other CB clients
Other Users?
Others about the Monastery: (2)
As of 2022-01-24 23:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (65 votes). Check out past polls.

    Notices?