Question: Reading parameters from file using sed

Hej everyone,

I am trying to run a Maple script for multiple parameters on our cluster, so far so good. I found that I can pass for example a:=1 and b:=2 to a Maple script using

maple -c "a:=1;" -c "b:=2;" < script.mpl

Is that the best/only way? For convenience I would like to read the parameters from a file, my first idea was to work with sed, so I tried

maple $(sed -n 1'p' data) < script.mpl

This should take the first line from data (which is -c "a:=1;" -c "b:=2;"), so that I would expect to get the same result.
Unfortunately, this is not the case, only the first parameter a:=1 is passed correctly and non of the further parameters.

I've appended the files, I used.

This may be not a Maple problem but rather me making a mistake using sed, but maybe you can see where I made a mistake.

Thanks in advance,

Sören

 

a

b

c

Download script.mw

The mw-file has to be exported as an mpl-file first. In my case data just contains one line: -c "a:=1;" -c "b:=2;" -c "c:=3;" (I couldn't upload either)

Please Wait...