Command Line Basics - Part 16: Bash Scripting: | Ray Wenderlich Videos

In this introduction to Bash scripts, you'll learn how to define variables as well as how to use "tests" and if-statements.


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/4729-command-line-basics/lessons/16

@luke_parham, I have put down the code exactly as you showed but when trying to sh script.sh I see a message:
This is interpolation A = 10

This is not B != $B

script.sh: line 10: syntax error in conditional expression

script.sh: line 11: syntax error near `then’

script.sh: line 11: `then’

Please explain what might be wrong?

@luke_parham Can you please help with this when you get a chance? Thank you - much appreciated! :]