文档介绍:bash
Pocket Reference
bash
Pocket Reference
Arnold Robbins
Beijing • Cambridge • Farnham • Köln • Sebastopol • Taipei • Tokyo
bash Pocket Reference
by Arnold Robbins
Copyright © 2010 Arnold Robbins. All rights reserved.
Printed in Canada.
Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Se-
bastopol, CA 95472.
O’Reilly books may be purchased for educational, business, or sales promo-
tional use. Online editions are also available for most titles (
). For more information, contact our corporate/institutional
sales department: (800) 998-9938 or ******@.
Editor: Mike Loukides
Production Editor: Loranah Dimant
Proofreader: Loranah Dimant
Indexer: Fred Brown
Cover Designer: Karen Montgomery
Interior Designer: David Futato
Printing History:
May 2010: First Edition.
Nutshell Handbook, the Nutshell Handbook logo, and the O’Reilly logo are
registered trademarks of O’Reilly Media, Inc., bash Pocket Reference and re-
lated trade dress are trademarks of O’Reilly Media, Inc.
Many of the designations used by manufacturers and sellers to distinguish
their products are claimed as trademarks. Where those designations appear
in this book, and O’Reilly Media, Inc. was aware of a trademark claim, the
designations have been printed in caps or initial caps.
While every precaution has been taken in the preparation of this book, the
publisher and author assume no responsibility for errors or omissions, or for
damages resulting from the use of the information contained herein.
ISBN: 978-1-449-38788-4
[TM]
1272386645
Contents
The Bash Shell 1
Conventions 2
History 2
Overview of Features 3
Invoking the Shell 4
Syntax 6
Functions 18
Variables 20
Arithmetic Expressions 36
Command History 37
pletion 41
Job Control 46
Shell Options 47
Command Execution 52
Coprocesses 53
Restricted Shells 54
Built-mands 55
Resources 109
Acknowledgments 110
Index 111
v
The Bash Shell
This pock