1

I was asked to create command which generates one word in terminal, if internet connection is absense, and another one, if it present. For doing that it seems that I need "if" and "else" syntaxis. Is it possible to provide such syntaxis in terminal?

muru
  • 207,228

1 Answers1

11
$ if [ 'a' = 'b' ]; then echo 'Equal'; else echo 'Not equal'; fi
Not equal
$