How to set a default value in an IF snippet?
- by kuti
Hello,
I have the following snippet in a bash script written in Solaris 10:
printf "port(389)="
read PORT
if [[ $PORT == "" ]]; then
PORT=389
fi
What I am trying to get that if the user hits the enter key, the Port should be set to 389.
The snippet above does not seem to be working.
Any suggestions?