Linux Topic
   >  Shell Scripts
   >  Using Comments
   >  Passing Arguments to Scripts
   >  Using Conditional Statements
   >  Using Loop Statements
   >  Reading and Writing Files
   >  Script Permissions
   >  Cron and Scheduling
   >  A Scripting Example
   >  Other Scripting Languages


Using Shell Scripts

Introduction to Shell Scripts

If you have one or more commands that you regularly use, you can bundle the commands into a file known as a Shell Script. Shell Script files have an .sh file extension (-and you need to assign them execute permission using chmod) but are otherwise the same as standard text files. These can then be scheduled to run on certain dates/times using the cron utility -or dragged to the desktop or taskbar and just double clicked to run. The Windows equivalent would be a .bat file.

Whole books have been writing on the subject of BASH Shell scripting and we cannot hope to cover that sort of area here. What we will aim to do is to introduce you to the basic concepts and what sort of things you can create using the language. If this whets your appetite (-and we hope that it does), we've included links to detailed pages on other sites and tips for finding more detail via your favourite search engine.

To sum up: the subject of Linux Shell Scripting may seem daunting now, but if you begin by just cut'n'pasting your most frequently used Shell commands into a file, you can refine your code (-plus your skills) over time - and at your own pace.

HomeSite IndexDesktop GuideServer GuideHints and TipsHardware CornerVideo SectionContact Us

 sitelock verified Firefox Download Button