osx - returning to previous if statements in bash -
say i've got following:
echo "would blarg, or flarg?" read -e act if [ "$act" == "blarg" ] echo "go blarg." echo "possible blargs blah , flah, or go previous question." read -e marv fi if [ "$act" == "flarg" ] echo "go flarg." echo "possible flargs blah , flah, or go previous question." read -e carve fi (more if statements following general pattern)
i need know how back
go previous question (blah or flah) answer either marv
or carve
, , 1 go first 1 (flarg or blarg).
edit: need know how redefine variable using read
. boy, overthink things.
do mean this:
while ! [[ "${act-}" =~ [bf]larg ]] read -e act [...] done
Comments
Post a Comment