I have a little script that lists the directories in a given folder... Which works great. I can then type what number and it sets that given folder as my environment.
I'd like to create something similar that only lists directories matching a grep pattern. Is this possible? Say search for 20 and it will list shots 20, 200 etc
# SET SHOT BASED ON DIRECTORIES IN SHOT FOLDER - THIS LISTS ALL DIRECTORIES alias sl='cds ; printf "Please select SHOT ENVIRONMENT:\n" select d in */ ; do test -n "$d" && break; echo ">>> Invalid Selection"; done cd "$d" && ss'
Any help? I'm quite new to this.