I am not able to parse the arguments of a script properly. The scenario is explained below.
First script (test2.sh):
#! /bin/sh
arg_part1="./test1.sh '123 789'"
arg_part2=456
#Option 1
${arg_part1} ${arg_part2}
#Option 2
$("$arg_part1" arg_part2)
Second script (test1.sh):
#! /bin/sh
echo "Hello World $1 $2"
Output:
Hello World '123 789'
./test1.sh '123 789': No such file or directory
Desired output:
Hello World 123 789 456
The '123 789' should be processed as first argument and 456 should be my second argument. Note: I do not have the option of breaking up arg_part1 in two different variables.