I have a c++ code which i have compile and this is how i run the c++ code in the terminal. ./executedfile inputargument.txt
.
Am trying to write a bash script that can run the command but am having challenges
Like πάντα ῥεῖ said, just put the command in the script so it would look something like this:
#!/bin/bash
./executedfile inputargument.txt
After you write the script either do sudo chmod a+x nameOfBASHScriptHere
or run it with sh nameOfBASHScriptHere
.
What's the problem with that script? Please be specific.
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.