Linux Shell Scripting Tutorial v2.0.pdf

Aperçu du fichier PDF linux-shell-scripting-tutorial-v2-0.pdf - page 8/301

Page 1...6 7 8910301

Aperçu texte

Linux Shell Scripting Tutorial - A Beginner's handbook:About

Linux Shell Scripting Tutorial - A Beginner's
This document is Copyright (C) 1999-2009 by Vivek Gite [1] and its contributors. Some rights reserved.

This book is for students and Linux System Administrators. It provides the skills to read, write, and debug Linux
shell scripts using bash shell. The book begins by describing Linux and simple scripts to automate frequently
executed commands and continues by describing conditional logic, user interaction, loops, menus, traps, and
functions. Finally, book covers various sys admin related scripts such as making a backup, using cron jobs, writing
interactive tools, web based tools, remote login, ftp and database backup related scripts. This book is intended for
Linux system administrators or students who have mastered the basics of a Linux Operating System. You should be
able to:
• Login to local or remote Linux system.
• Use basic Linux commands, such as cp, mv, rm, man,less, chmod and others.
• Create and edit text files in vi or any other text editor.
• GUI is not required except for interactive GTK+ based GUI scripts.

Licensing Information
This book is available under Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported [2].
• You are free:
• to Share — to copy, distribute and transmit the work
• to Remix — to adapt the work
• Under the following conditions:
• Attribution — If you republish this content, we require that you:
1. Indicate that the content is from "Linux Shell Scripting Tutorial - A Beginner's handbook" (http://bash., and nixCraft (
2. Hyperlink to the original article on the source site (e.g.,
3. Show the author name (e.g., Vivek Gite) for all pages.
4. Hyperlink each contributors name back to their profile page on the source wiki (e.g.,
• Noncommercial — You may not use this work for commercial purposes including the Internet ad supported
websites or any sort of print media.
• Share Alike — If you alter, transform, or build upon this work, you may distribute the resulting work only under
the same or similar license to this one.
With the understanding that:
• Waiver — Any of the above conditions can be waived if you get permission from the copyright holder (i.e. the
Author: Vivek Gite).
• Other Rights — In no way are any of the following rights affected by the license:
• Your fair dealing or fair use rights;
• The author's moral rights;
• Rights other persons may have either in the work itself or in how the work is used, such as publicity or privacy