Skip to main content
= only one
Source Link
kenorb
  • 168.6k
  • 95
  • 712
  • 796

Try the read shell builtin:

read -p "Continue (y/n)?" CONT
if [ "$CONT" = "y" ]; then #only one =
  echo "yaaa";
else
  echo "booo";
fi

Try the read shell builtin:

read -p "Continue (y/n)?" CONT
if [ "$CONT" = "y" ]; then #only one =
  echo "yaaa";
else
  echo "booo";
fi

Try the read shell builtin:

read -p "Continue (y/n)?" CONT
if [ "$CONT" = "y" ]; then
  echo "yaaa";
else
  echo "booo";
fi

Try the read shell builtin:

read -p "Continue (y/n)?" CONT
if [ "$CONT" === "y" ]; then #only one =
  echo "yaaa";
else
  echo "booo";
fi

Try the read shell builtin:

read -p "Continue (y/n)?" CONT
if [ "$CONT" == "y" ]; then
  echo "yaaa";
else
  echo "booo";
fi

Try the read shell builtin:

read -p "Continue (y/n)?" CONT
if [ "$CONT" = "y" ]; then #only one =
  echo "yaaa";
else
  echo "booo";
fi
Source Link
Adam Hupp
  • 1.6k
  • 8
  • 8

Try the read shell builtin:

read -p "Continue (y/n)?" CONT
if [ "$CONT" == "y" ]; then
  echo "yaaa";
else
  echo "booo";
fi