Skip to content Skip to sidebar Skip to footer

Passing Arguments Containing White Space Through A Wrapper Shell Script To Python Script

I have a wrapper script command.sh as main launch script for my python application, primarily to set some environment variables like PYTHONPATH: #!/bin/bash export PYTHONPATH=lib6

Solution 1:

Use $@ instead of $*, and quote it with ":

#!/bin/bashexport PYTHONPATH=lib64/python/side-packages
./command.py "$@"

See bash(1), section "Special Parameters", for more information.

Post a Comment for "Passing Arguments Containing White Space Through A Wrapper Shell Script To Python Script"