HylaFAX The world's most advanced open source fax server

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [hylafax-users] Having problems running sendfax from a bash script.



Thanks to everyone that helped on this. Here was the final solution.

commandparms=$commandparms"add parms here via different part of my program."
commandparms=$commandparms" -x \"parm with quoted data\""
commandparms=$commandparms"add more parms here"

commandline="eval sendfax $commandparms"

$commandline

just adding the eval to the string before executing the string did it.

All is now well with the world:)

Thanks again

John


On Jun 16, 2007, at 11:19 AM, Lee Howard wrote:

John Warren wrote:

BTW, I assumed that you could since I saw hylafax doing it for things like mv or cp and other such functions.


Yes.  This is no problem:

CP=/bin/cp
$CP file1 file2

But this is a problem:

CP="/bin/cp file1 file2"
$CP

And maybe you need to try "eval" instead of "exec".  I don't script shell that way most of the time, so I don't use those much.

Lee.




Project hosted by iFAX Solutions