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

Shell Strings

Strings are scalar and there is no limit to the size of a string.
Any characters, symbols, or words can be used to make up your string.


Strings in Linux Shell Scripting


How to define a string?
We use single or double quotations to define a string.
"Double Quotes" - Anything enclose in double quotes removed meaning of that characters (except \ and $).
'Single quotes' - Enclosed in single quotes remains unchanged.
`Back quote` - To execute command


single='Single quoted'
double="Double quoted"
echo $single
echo $double

Save the above example script as
chmod 755

String Formatting

Character Description
-n Do not output the trailing new line.
-e Enable interpretation of the following backslash escaped characters in the strings:
\a alert (bell)
\b backspace
\c suppress trailing new line
\n new line
\r carriage return
\t horizontal tab
\\ backslash


echo -e "Hello \t Welcome to Linux Shell Scripting"

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