bashcookbook.pdf
(
11034 KB
)
Pobierz
bash Cookbook
Carl Albing, JP Vossen, and Cameron Newham
Beijing
•
Cambridge
•
Farnham
•
Köln
•
Sebastopol
•
Tokyo
bash Cookbook
by Carl Albing, JP Vossen, and Cameron Newham
Copyright © 2007 O'Reilly Media, Inc.. All rights reserved.
Printed in the United States of America.
Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472.
O’Reilly books may be purchased for educational, business, or sales promotional use. Online editions
are also available for most titles (http://my.safaribooksonline.com). For more information, contact our
corporate/institutional sales department: 800-998-9938 or
corporate@oreilly.com.
Editor:
Mike Loukides
Production Editor:
Laurel R.T. Ruma
Copyeditor:
Derek Di Matteo
May 2007:
First Edition.
Cover Designer:
Karen Montgomery
Interior Designer:
David Futato
Illustrator:
Robert Romano and Jessamyn Read
Revision History for the First Edition:
2007-05-11
First release
2013-11-15
Eighth release
See
http://oreilly.com/catalog/errata.csp?isbn=9780596526788
for release details.
Nutshell Handbook, the Nutshell Handbook logo, and the O’Reilly logo are registered trademarks of
O’Reilly Media, Inc.
bash Cookbook,
the image of a wood turtle, and related 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 authors assume
no responsibility for errors or omissions, or for damages resulting from the use of the information con-
tained herein.
ISBN: 978-0-596-52678-8
[LSI]
1384529112
Table of Contents
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii
1. Beginning bash . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
0
0
1.1
1.2
1.3
1.4
1.5
1.6
1.7
1.8
1.9
1.10
1.11
1.12
1.13
1.14
1.15
1.16
Why bash?
The bash Shell
Decoding the Prompt
Showing Where You Are
Finding and Running Commands
Getting Information About Files
Showing All Hidden (dot) Files in the Current Directory
Using Shell Quoting
Using or Replacing Built-ins and External Commands
Determining If You Are Running Interactively
Setting bash As Your Default Shell
Getting bash for Linux
Getting bash for xBSD
Getting bash for Mac OS X
Getting bash for Unix
Getting bash for Windows
Getting bash Without Getting bash
Learning More About bash Documentation
2
3
4
5
6
8
10
12
13
15
15
17
21
21
22
23
24
25
2. Standard Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
2.1
2.2
2.3
2.4
2.5
2.6
2.7
2.8
Writing Output to the Terminal/Window
Writing Output but Preserving Spacing
Writing Output with More Formatting Control
Writing Output Without the Newline
Saving Output from a Command
Saving Output to Other Files
Saving Output from the ls Command
Sending Both Output and Error Messages to Different Files
30
31
32
33
34
35
36
38
iii
Plik z chomika:
Dest90
Inne pliki z tego folderu:
Beginning Django.pdf
(10862 KB)
Lightweight Django.pdf
(4513 KB)
K. N. King język c. nowoczesne programowanie. wydanie ii helion.pdf
(10664 KB)
Java - Language Specification.pdf
(7931 KB)
Java Eck.pdf
(5543 KB)
Inne foldery tego chomika:
Pliki dostępne do 01.06.2025
Anime
Do gier
Filmy
Gry
Zgłoś jeśli
naruszono regulamin