Pro_Bash_programming_scripting_the_gnu_Linux_shell.pdf
(
5339 KB
)
Pobierz
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
The eXperT’s VoiCe
®
in linuX
Covering
Bash 4.0
Pro
Bash
Programming
Scripting the GNU/Linux Shell
Programming bash from one-liners
to professional programs
Chris F.A. Johnson
■
CONTENTS
Pro Bash Programming
Scripting the GNU/Linux Shell
■
■
■
Chris F.A. Johnson
i
■
CONENTS
Pro Bash Programming: Scripting the GNU/Linux Shell
Copyright © 2009 by Chris F.A. Johnson
All rights reserved. No part of this work may be reproduced or transmitted in any form or by any means,
electronic or mechanical, including photocopying, recording, or by any information storage or retrieval
system, without the prior written permission of the copyright owner and the publisher.
ISBN-13 (pbk): 978-1-4302-1997-2
ISBN-13 (electronic): 978-1-4302-1998-9
Printed and bound in the United States of America 9 8 7 6 5 4 3 2 1
Trademarked names may appear in this book. Rather than use a trademark symbol with every
occurrence of a trademarked name, we use the names only in an editorial fashion and to the benefit of
the trademark owner, with no intention of infringement of the trademark.
Lead Editor: Frank Pohlmann
Technical Reviewer: Ed Schaefer
Editorial Board: Clay Andres, Steve Anglin, Mark Beckner, Ewan Buckingham, Tony Campbell,
Gary Cornell, Jonathan Gennick, Jonathan Hassell, Michelle Lowman, Matthew Moodie,
Jeffrey Pepper, Frank Pohlmann, Douglas Pundick, Ben Renow-Clarke, Dominic Shakeshaft,
Matt Wade, Tom Welsh
Project Manager: Kylie Johnston
Copy Editor: Kim Wimpsett
Compositor: ContentWorks, Inc.
Indexer: Julie Grady
Distributed to the book trade worldwide by Springer-Verlag New York, Inc., 233 Spring Street, 6th Floor,
New York, NY 10013. Phone 1-800-SPRINGER, fax 201-348-4505, e-mail
orders-ny@springer-sbm.com
, or
visit
http://www.springeronline.com
.
For information on translations, please contact Apress directly at 233 Spring Street, New York, NY 10013.
E-mail
info@apress.com
, or visit
http://www.apress.com
.
Apress and friends of ED books may be purchased in bulk for academic, corporate, or promotional use.
eBook versions and licenses are also available for most titles. For more information, reference our
Special Bulk Sales–eBook Licensing web page at
http://www.apress.com/info/bulksales
.
The information in this book is distributed on an “as is” basis, without warranty. Although every
precaution has been taken in the preparation of this work, neither the author(s) nor Apress shall have
any liability to any person or entity with respect to any loss or damage caused or alleged to be caused
directly or indirectly by the information contained in this work.
The source code for this book is available to readers at
http://www.apress.com
.
ii
■
CONTENTS
Contents at a Glance
■
About the Author................................................................................................... xvi
■
About the Technical Reviewer ............................................................................. xvii
■
Introduction .......................................................................................................... xix
■
Chapter 1: Hello, World! Your First Shell Program ..................................................1
■
Chapter 2: Input, Output, and Throughput ...............................................................7
■
Chapter 3: Looping and Branching ........................................................................19
■
Chapter 4: Command-Line Parsing and Expansion...............................................29
■
Chapter 5: Parameters and Variables....................................................................43
■
Chapter 6: Shell Functions.....................................................................................59
■
Chapter 7: String Manipulation..............................................................................67
■
Chapter 8: File Operations and Commands ...........................................................79
■
Chapter 9: Reserved Words and Builtin Commands .............................................97
■
Chapter 10: Writing Bug-Free Scripts and Debugging the Rest..........................113
■
Chapter 11: Programming for the Command Line ..............................................125
■
Chapter 12: Runtime Configuration .....................................................................141
■
Chapter 13: Data Processing ...............................................................................157
■
Chapter 14: Scripting the Screen.........................................................................179
■
Chapter 15: Entry-Level Programming ................................................................191
■
Appendix: Shell Variables ....................................................................................205
■
Index ....................................................................................................................221
iii
Plik z chomika:
Expearre4
Inne pliki z tego folderu:
Linux Server Hacks 100 industr - Rob Fickenger_769.pdf
(34825 KB)
boot-time-slides.pdf
(19140 KB)
Linux Bible 2009 Edition (Bible Series) - Christopher Negus 9780470373675.pdf
(37035 KB)
Linux_Network_Servers.pdf
(36256 KB)
Linux Mint Essentials - Jay Lacroix 9781782168157.pdf
(25450 KB)
Inne foldery tego chomika:
G_CYBSEC
ha
ha2
Hakin
Magick
Zgłoś jeśli
naruszono regulamin