- This topic has 1 reply, 2 voices, and was last updated 4 years, 1 month ago by .
Viewing 1 reply thread
Viewing 1 reply thread
- You must be logged in to reply to this topic.
› Forums › Basic skills › Programming › Shell scripting (in bash) › Initialise and Train Models File
I tried to create a file which runs the two scripts and I don’t understand what is wrong here.
#!/usr/bin/bash
SCRIPT_PATH=”/Documents/sp/digit_recogniser/”
$ ./scripts/initialise_models
$ ./scripts/train_models
When I attempt to run the initialise and train models script from the terminal, I get an error message that the commands on line 2 and 3 are not recognised (after I used chmod to grant permission to run initialise and train models)
Your script should be simply
#!/usr/bin/bash ./scripts/initialise_models ./scripts/train_models
You don’t need the $
– those represent the bash prompt in the instructions.
Your line SCRIPT_PATH="/Documents/sp/digit_recogniser/"
is not needed because you don’t use the shell variable SCRIPT_PATH
anywhere later in the script. If you did need this, then the path should most probably be ~/Documents/sp/digit_recogniser/
where ~
is shorthand for your home directory.
Some forums are only available if you are logged in. Searching will only return results from those forums if you log in.
Copyright © 2024 · Balance Child Theme on Genesis Framework · WordPress · Log in