While reading the Bash Reference Manual I came across the following example:
select fname in *;
do
echo you picked $fname \($REPLY\)
break;
done
The output of the script is the following:
1) case1.sh
2) loop1.sh
3) loop2.sh
4) select1.sh
#? 3
you picked loop2.sh (3)
All the options given are the files of the directory I'm running the script from (select1.sh).
My question is how does the script know the contents of my current working directory?
My guess would be that the * token is responsible for it.