Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

Re: record every backtick on STDOUT or some log file

by kennethk (Monsignor)
on Apr 23, 2012 at 21:05 UTC ( #966680=note: print w/ replies, xml ) Need Help??

in reply to record every backtick on STDOUT or some log file

Unfortunately, I think the simplest way to make this happen is to bite the bullet and mod the code. Assuming the commands are not too full of special characters, you should be able to get away with running a backup of the file through s/`([^`]*)`.*?;\K/print \$log qq{$1};/g; to automatically add print statements after all backticks. Obviously, you'll have to open the $log filehandle.

Alternatively, you could hack a version of perl to output everything passed to backticks...

#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.

Comment on Re: record every backtick on STDOUT or some log file
Select or Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (12)
As of 2014-07-10 17:35 GMT
Find Nodes?
    Voting Booth?

    When choosing user names for websites, I prefer to use:

    Results (214 votes), past polls