Skip to main content
deleted 6 characters in body
Source Link
nbro
  • 16.1k
  • 34
  • 122
  • 219

The easiest way to achieve this with the least number of lines is as follows:

 read -p "<Your Friendly Message here> : y/n/cancel" CONDITION;    if [ "$CONDITION" == "y" ]; then   # do something #doSomethinghere!  fi 

The "if"if is just an example,: it is up to you how to handle this variable.

The easiest way to achieve this with the least number of lines is as follows:

 read -p "<Your Friendly Message here> : y/n/cancel" CONDITION;  if [ "$CONDITION" == "y" ]; then   #doSomething  fi 

The "if" is just an example, it is up to you how to handle this variable.

The easiest way to achieve this with the least number of lines is as follows:

read -p "<Your Friendly Message here> : y/n/cancel" CONDITION;   if [ "$CONDITION" == "y" ]; then # do something here! fi 

The if is just an example: it is up to you how to handle this variable.

Grammar, punctuation.
Source Link
Myrddin Emrys
  • 44.4k
  • 12
  • 44
  • 60

The easiest way to achieve this with lessthe least number of lines is as follows.:

 read -p "<Your Friendly Message here> : y/n/cancel" CONDITION; if [ "$CONDITION" == "y" ]; then #doSomething fi 

The "if" is just an example, it is up to you how to handle this variable.

The easiest way to achieve this with less number of lines is as follows.

 read -p "<Your Friendly Message here> : y/n/cancel" CONDITION; if [ "$CONDITION" == "y" ]; then #doSomething fi 

The "if" is just an example, it is up to you how to handle this variable.

The easiest way to achieve this with the least number of lines is as follows:

 read -p "<Your Friendly Message here> : y/n/cancel" CONDITION; if [ "$CONDITION" == "y" ]; then #doSomething fi 

The "if" is just an example, it is up to you how to handle this variable.

Source Link
Apurv Nerlekar
  • 2.3k
  • 1
  • 21
  • 29

The easiest way to achieve this with less number of lines is as follows.

 read -p "<Your Friendly Message here> : y/n/cancel" CONDITION; if [ "$CONDITION" == "y" ]; then #doSomething fi 

The "if" is just an example, it is up to you how to handle this variable.