I have a fallowing simple bash script:
echo -n "Please insert your name: "
echo -n "Please enter your sex(m or f, default is m): "
echo -n "Please enter your hometown(default is New-York): "
echo name: $NAME
echo sex: $SEX
echo hometown: $TOWN
It works fine, but is it possible to have default values using bash read(1b)? I mean if user is prompter for sex, he just pushes ENTER and by default 'm' is chosen. Or if user is prompted for hometown and he doesn't insert anything, but just pushes ENTER button, 'New-York' sis chosen by default
Are such default values possible in bash?