Receive all updates via Facebook. Just Click the Like Button Below

Shell Syntax

SHELL follows a very specific syntax and it's is important to develop good syntax habits as it will help you to debug your code later and save time.


General Syntax in Linux Shell Scripting


Case Sensitivity
As you know Linux is case sensitive, the file names, variables, and arrays used in shell scripts are also case sensitive.

Check out this Example:

echo "The value of string1 is $string1 "
echo "The value of String1 is $String1 "

Comments are used to escape from the code.
This part of the code will be ignored by the program interpreter.
Adding comments, make things easy for the programmer, while editing the code in future.


string1=10 # Assigning value for string1
String1=20 # Assigning value for String2
# Now print the values
echo "The value of string1 is $string1 "
echo "The value of String1 is $String1 "

Escaping Characters
The escape character we use is the backslash ( \ ).
This is used to escape any type of character that might interfere with our code.

For example using the dollor sign.

echo "The value of \$1 USD is \$1 CAD "

Try the same example without " \ ".


Related posts:

Advertise here

picture picture

Follow us


- Tech-Tutorials

Like us

About Techcuriosity

I am Telson, the webmaster of and through this site, I share my knowledge and curiosities in the Tech World.

What We Offer

  • What is ..?
  • How to ..?
  • Difference between ..?
  • How .. works?
  • Get in Touch
    UK : +44 77 33 890 678

    picture picture

    Our Partners

  • Website Design Dubai
  • SEO Link Exchange
  • picture