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
• 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.103.63.62


Find more Info related to your curiosities @ our FORUM


First Shell Script

Open up your favorite text editor.
You can use any text editor to write the shell scripts.
Normally the shell scripts has the file extension .sh
In our example programs we will be saving the files with .sh extension.

 

firstshellscript.sh

Linux
-

The first line of every SHELL script is a commented line directed toward the interpreter.

firstshellscript.sh:
#!/bin/bash

Try the command: which bash
Use this location for your shell scripts.

Lets start with a simple script to print " Hello World "
Example:

 
#!/bin/bash
echo "Hello World"

Save it as " firstshellscript.sh ".
You will need to give execute permissions for your scripts.

Examples:
$ chmod +x firstshellscript.sh
or
$ chmod 755 firstshellscript.sh

Now how to run your script?
There are 3 different ways to run a shell script:
1. bash firstshellscript.sh
2. sh firstshellscript.sh
3. ./firstshellscript.sh

Try all the above.
In our examples we will be using any of these options.

-
<< Previous    |     Next >>
 
© TechCuriosity.com 2006 - 2007. All Rights Reserved.
Designed and Maintained by Telson Thomas
Techcuriosity
Website News
Sponsored Links
• Flash Templates
• Web Templates
• Flash Templates store
• Free website templates
• Free Flash Templates
 
• Advertise Here
 
Help us in our Mission
 
 
Free Tutorials
• HTML Tutorial
• PERL Tutorial
• Exim Commands
• MySQL Commands
• FTP Commands
• Shell Scripting Tutorial
 
Member Login
Username:

Password:

 
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