简体   繁体   中英

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.

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)" .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM