1

I would like to use this in my perl script:

sudo killall -HUP tor

would this work?:

system echo sudo killall -HUP tor

Also how would I get around having to authenticate when running the script/from within the script?

Eliah Kagan
  • 119,820

1 Answers1

0

You could, although your syntax is wrong. The correct syntax would simply to use sudo with any of Perl execution methods:

system "sudo command";
`sudo command`;
exec "sudo command";

But like the comments above point out, it's probably not what you want to do to solve the problem you're trying to solve.

felwithe
  • 262