Learn Tiny Core. View Tiny Core Screen Shots and Videos.
/usr/bin/select: line xx: can't open in: no such file
#!/bin/bashOPTIONS="Hello Quit"select opt in $OPTIONS; do if [ "$opt" = "Quit" ]; then echo done exit elif [ "$opt" = "Hello" ]; then echo Hello World else clear echo bad option fidone
Gah!I was actually using /bin/sh for my script. The example that I posted above was copied and pasted from the website that I was using to test.But if I use /usr/local/bin/bash then the script runs properly. I have a lot of scripts that I need to go change from /bin/sh to /usr/local/bin/bash.Thanks for pointing out my error.
I have a lot of scripts that I need to go change from /bin/sh to /usr/local/bin/bash.
Quote from: KHarvey on May 30, 2014, 05:27:31 PMI have a lot of scripts that I need to go change from /bin/sh to /usr/local/bin/bash.That sounds like really bad practice in two aspects:1. Never ever use a bash header for portable shell scripts without explicit bashisms.2. Never ever use #!/usr/local/bin/bash as header for bash scripts, but always #!/usr/bin/env bash.