Forum Discussion
batch file
Hi, have couple of commands to fetch configuration files, statistical data etc...over cli, need to run it as a batch script. have saved it as test.sh file and unable to run it via cli. is there any other format to be used, if so please let me know what format to save and how to run it.
1 Reply
- Leonardo_Souza
Cirrocumulus
I sure you mean bash script.
Make sure you have this line at the beginning:
!/bin/bashAlso, make sure the file has permission to run:
chmod +x filename
Last make sure the file is formatted for Unix. See the explanation here:
https://en.wikipedia.org/wiki/Unix2dos
You can download the software here, including a version for windows.
https://waterlan.home.xs4all.nl/dos2unix.html
Also, most text editors, like notepad++, have a function to do that.
If you still can't run the script. Paste here the command you are using to run it, and also the output you get when you try to run.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
