Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

Re^2: system commands and returns

by perl_zen (Initiate)
on Nov 30, 2011 at 14:40 UTC ( #940870=note: print w/replies, xml ) Need Help??

in reply to Re: system commands and returns
in thread system commands and returns


Thank you for this explanation. Being new to Perl, it is very helpful.

I have several commands that I would like to execute as  other_user , so I would like that particular shell to execute more than one command. As in the sample code, I would like to su to the user and print "cOmMaNd LiNe" without any external interaction. Needing to type "exit" from the command line (in order to get "cOmMaNd LiNe" to print) prohibits this ability.

I think your explanation and the example given by cdarke both look promising.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://940870]
[marioroy]: LA https://unix. questions/81349/ how-do-i-use-find- when-the-filename- contains-spaces
[Lady_Aleena]: marioroy, I figured it out.
[marioroy]: LA find -printf ...
[marioroy]: Lady_Aleena++

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (5)
As of 2017-04-23 23:50 GMT
Find Nodes?
    Voting Booth?
    I'm a fool:

    Results (433 votes). Check out past polls.