if then statements
say i wanted to ask a yes or no question and print diffent answers depending on the answer..... how would i go about do that
bash script all help is appreciated |
|
it didnt help... thanks there
|
#!/bin/bash
#I'm rather newbie in bash script :) echo Enter yes or no please :) read var if ["$var" = yes] then echo You entered yes elif ["$var" = no] echo You entered no else echo Can not evaluate answer fi |
also you can use "case" instead of "if" .
|
All times are GMT -5. The time now is 10:30 AM. |