I have a program that receives some options, like below:
root@machine:~$ cat notmodifiable
#!/bin/bash
echo 1: $1
echo 2: $2
echo 3: $3
echo 4: $4
And I have a script to pass a variable as argument list to this program, below script demonstrates the logic:
root@machine:~$ cat myscript
#!/bin/bash
args='a b "c 3" d'
./notmodifiable ${args}
When executing this script I got:
root@machine:~$ ./myscript
1: a
2: b
3: "c
4: 3"
What I want is:
1: a
2: b
3: c 3
4: d
I can not modify the notmodifiable script(it is actually a ELF binary), how can I achieve this by modify "myscript"?