Sounds like quite a convoluted question, but it's really not. I'm busy building a menu in a bash script, and as part of the case statement I am trying to call another script that I created a while ago which edits a file, and it's breaking. Here is an example:
#!/bin/bash
PS3="Please choose an option: "
options=("Do this" "Do nothing")
select opt in "${options[@]}"
do
case $opt in
"Do this")
read -p "Please enter the file name:`echo $'\nE9> '`" FILENAME
getscript $FILENAME
break
;;
"Do nothing")
break
;;
esac
done
The error that I get from this is as follows: getscript: command not found
To illustrate that this works, I ran getscript from the normal command prompt and it still works:
$ getscript randomfilename.txt
done
A little more detail, in case in matters... The getscript.sh script in question is located in /usr/local/bin and I have an alias created for it in .bashrc in my current user directory, which allows me to call getscript only.
Please help?