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

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

This is not B != $B line 10: syntax error in conditional expression line 11: syntax error near `then’ 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! :]