Techcuriosity
Resources
Linux
• About Linux
• Linux Vs Windows
• Linux File Permissions
• Linux Directory Structure
• Linux Basic Commands
• Linux Commands Glossary
• Linux Server Admin Commands
• Advanced Permissions in Linux
 
Web Hosting
• About Web Hosting
• Windows Web Hosting
• Linux Web Hosting
• VPS Hosting
• Ruby on Rails Hosting
• Web Host - Features
• DNS propagation Delay
• Wildcard DNS
• Addon, Parked & Sub Domain
• Top Web Hosts
 
Template Editing
• About Templates
• HTML Templates
• Photoshop Template
• Word Template
• CSS Template
• Oscommerce Template
 
Bioinformatics
• Introduction
• Sequence Analysis
• Bioinformatics Tools
• Bioinformatics Databases
• Bioinformatics Software
 
Free Perl Scripts for Bioinformatics
• Scripts Library
• Dna2protein.pl
• Dnafrequency.pl
• Dna2rna.pl
• Rna2dna.pl
• Count-aminoacids.pl
• Motifs.pl
• Reverse-complement.pl
• Mutation.pl
 
Curiosity Topics
• Online Data Security
• VDS Technology
• How Website Works?
• About Hacking
 
 
Home   |   About us   |   Services   |   Forum   |   Articles   |   Tutorials   |   Contact us
 


Gateway to End all your Curiosities in Information Technology and Bio-Informatics!!.. FREE turorials for Linux, Web designing, Web template Editing, Operating systems, New technology, Bioinformatics, Bioinformatics perl scripts, Clinical research and much more curious topics you need to know.  
Your IP address is: 38.107.179.240


Reliable Hosting Solutions

Find more Info related to your curiosities @ our FORUM


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

Linux
-

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:

 
#!/bin/bash
string1=10
String1=20
echo "The value of string1 is $string1 "
echo "The value of String1 is $String1 "

Comments
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.

Example:

 
#!/bin/bash
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.

 
#!/bin/bash
echo "The value of \$1 USD is \$1 CAD "

Try the same example without " \ ".

-
<< Previous    |     Next >>
 
© TechCuriosity.com 2006 - 2012. All Rights Reserved.
Designed and Maintained by Telson Thomas
Techcuriosity
Website News
Sponsored Links
• Free Web Hosting
 
• Advertise Here
 
Help us in our Mission
 
Twitter 
Our Network Sites
• Web Hosting Solutions
• SEO and Link Directory
 
Free Tutorials
• HTML Tutorial
• PERL Tutorial
• Exim Commands
• MySQL Commands
• FTP Commands
• Shell Scripting Tutorial
 
 
Search for Curiosity
 
 
 
Forum Curiosity Topics
• Forum Index
• Operating System's
• Web Hosting
• Programming
• Bioinformatics
• Biology & Bio-Technology
• Computer Security
• Hacking
• General Curiosity
• Jobs
 
Newsletter Signup
 
Subscribe
 
 
• Link Directory
• SiteMap