If condition not work regular in bash -
code
if [ $setup==="y" ] echo "kurulum:"$setup exit full_dir=$full_dir"/public" else echo "sub-public folder exist? [public,web]" read folder_extend if [ $folder_extend ] full_dir=$full_dir"/"$folder_extend fi fi
setup param $setup view "n" after run sh still condition firts part run. wrong code ?
thanks.
change to:
if [ "$setup" = "y" ] echo "kurulum:"$setup exit full_dir=$full_dir"/public" else echo "sub-public folder exist? [public,web]" read folder_extend if [ "$folder_extend" ] full_dir=$full_dir"/"$folder_extend fi fi
it should single =
, , need spaces around it. should quote variables in contexts, in case contain spaces.
Comments
Post a Comment