I am using a different namespace for my python file execution. using a shebang/hashbang, to execute this script (/bin/bash -c ).
problem faced is shebang only accepts a single argument. even if i pass multiple args its treating it as a single string.
shebang used:
#!/sbin/ip netns exec tmp <executable>
Experiment:
single executable using :
#!/sbin/ip
Object " tmp" is unknown, try "ip help".
one arg shebang in tmp :
#!/sbin/ip netns
$/bin/bash -c tmp Command "tmp" is unknown, try "ip netns help".
with two arg shebang used in tmp:
#!/sbin/ip netns exec
$/bin/bash -c tmp Object "netns exec" is unknown, try "ip help".
- its picking "netns exec" as a single argument
full cmd used
shebang used in tmp :
#!/sbin/ip netns exec global python
$/bin/bash -c tmp Object "netns exec global python" is unknown, try "ip help".
Is there any way to pass multiple argumenets to shebang executable other than chaining files.