snip
> How can I quote the exec line above so what gets passed to /bin/sh is the log
> file line
> contained in double quotes?
snip
Use a different quoting mechanism:
exec qq($command "$cmd_msg");
or use a the multiple argument version of exec():
exec $command, $cmd_msg;
You may also
Michael Weber wrote:
Greetings!
I am not completely understanding how perl parses quotes.
Here is the line I want to execute:
exec "$command $cmd_msg";
The variable $command is an executable shell script "test.sh"
The problem comes in the $cmd_msg variable.
This contains a line from my
Greetings!
I am not completely understanding how perl parses quotes.
Here is the line I want to execute:
exec "$command $cmd_msg";
The variable $command is an executable shell script "test.sh"
The problem comes in the $cmd_msg variable.
This contains a line from my log file:
Nov 13 1