Bash Para Principiantes
Bash Guide for Beginners
Second Edition
Fultus ™ Books
Bash Guide for Beginners
Second Edition
by
Machtelt Garrels
Cover design by Fultus Corporation
ISBN-10: 1-59682-201-5
ISBN-13: 978-1-59682-201-6
All rights reserved.
Copyright © 2002-2010 by Machtelt Garrels
Published by Fultus Corporation
Corporate Web Site:
Fultus eLibrary:
OnlineBook Superstore:
email:
www.fultus.com
elibrary.fultus.com
store.fultus.com
production@fultus.com
The text of this book is freely distributable under the terms of the GNU Free Documentation License, which can
be found at http://www.gnu.org/copyleft/fdl.html. Cover art and layout are copyright Fultus Corporation and may
not be reproduced without permission; violators will be prosecutedto the fullest extent permissible by law.
The author and publisher have made every effort in the preparation of this book to ensure the accuracy of the
information. However, the information contained in this book is offered without warranty, either express or
implied. Neither the author nor the publisher nor any dealer or distributor will be held liable for any damages
caused or alleged to becaused either directly or indirectly by this book.
Linux is a registered trademark of Linus Torvalds. Penguin logo based on artwork by Larry Ewing.
All product names and services identified throughout this manual are trademarks or registered trademarks of
their respective companies.
Table of Contents
Table of ContentsIntroduction.......................................................................................................................... 12
Chapter 1. Bash and Bash scripts ........................................................................................ 17
1.1. Common shell programs........................................................................................................17
1.1.1. General shell functions....................................................................................................17
1.1.2. Shell types .........................................................................................................................17
1.2. Advantages of the Bourne Again SHell ...............................................................................18
1.2.1. Bash is the GNU shell......................................................................................................18
1.2.2. Features only found in bash ...........................................................................................19
1.3. Executing commands .............................................................................................................25
1.3.1.General...............................................................................................................................25
1.3.2. Shell built-in commands .................................................................................................25
1.3.3. Executing programs from a script .................................................................................26
1.4. Building blocks........................................................................................................................27
1.4.1. Shell building blocks........................................................................................................27
1.5. Developing good scripts ........................................................................................................29
1.5.1. Properties of good scripts...............................................................................................29
1.5.2. Structure ............................................................................................................................30
1.5.3. Terminology......................................................................................................................30
1.5.4. A word on order...
Regístrate para leer el documento completo.