user3420917
user3420917

Reputation: 19

Execute program with -- parameters in bash script

I'm trying to run the following command in a bash script:

antimicro --profile none.xml

In terminal it runs perfectly but not through bash, I've tried " and ' and [], just doesn't work..

Thank you.

Upvotes: 1

Views: 420

Answers (1)

l0b0
l0b0

Reputation: 58908

The path to none.xml will be relative to $PWD when running the script, not relative to the script. You can either refer to the file with an absolute path, a relative path from $PWD, or a relative path from the script using "$(cd "$(dirname "${BASH_SOURCE\[0\]}")" && pwd)".

Upvotes: 1

Related Questions