没有合适的资源?快使用搜索试试~ 我知道了~
The AWK Programming Language
5星 · 超过95%的资源 需积分: 11 372 下载量 69 浏览量
2014-02-14
12:53:09
上传
评论 5
收藏 7.94MB PDF 举报
温馨提示
试读
225页
《The AWK Programming Language》是三巨头Aho&Weinberger&Kernighan所著的书本,讲解AWK语言的。
资源推荐
资源详情
资源评论
The
Programming
~
"
·.
Language
PolyAWK-
The
Toolbox
Language·
Auru:o
V.
AHo
BRIAN
W.I<ERNIGHAN
PETER
J.
WEINBERGER
TheAWK4
Programming~
Language
TheA
WI(.
Programming~
Language
ALFRED
V.
AHo
BRIAN
w.
KERNIGHAN
PETER
J.
WEINBERGER
AT
& T Bell Laboratories
Murray Hill, New Jersey
A
••
ADDISON-WESLEY PUBLISHING COMPANY
Reading, Massachusetts •
Menlo
Park,
California •
New
York
Don
Mills, Ontario •
Wokingham,
England
•
Amsterdam
•
Bonn
Sydney
• Singapore •
Tokyo
•
Madrid
•
Bogota
Santiago •
San
Juan
This book
is
in the Addison-Wesley Series in
Computer
Science
Michael A. Harrison
Consulting Editor
Library
of
Congress
Cataloging-in-Publication
Data
Aho, Alfred
V.
The
AWK
programming language.
Includes index.
I.
AWK
(Computer program language) I. Kernighan,
Brian
W.
II.
Weinberger, Peter
J.
III.
Title.
QA76.73.A95A35 1988
005.13'3 87-17566
ISBN 0-201-07981-X
This
book was typeset in
Times
Roman
and
Courier by
the
authors,
using
an
Autologic
APS-5
phototypesetter
and
a
DEC
VAX
8550 running
the
9th
Edition
of
the
UNIX~
operating
system.
-
~
-
ATs.T
Copyright
c 1988
by
Bell Telephone Laboratories, Incorporated.
All rights reserved.
No
part
of
this publication
may
be
reproduced, stored
in
a retrieval
system,
or
transmitted,
in
any
form
or
by
any means, electronic, mechanical, photocopy-
ing, recording,
or
otherwise, without
the
prior written permission
of
the
publisher.
Printed
in
the
United
States
of
America. Published simultaneously in
Canada.
UNIX
is a registered
trademark
of
AT&T.
DEFGHIJ-AL-898
PREFACE
Computer users spend a lot
of
time doing simple, mechanical
data
manipula-
tion - changing the format of data, checking its validity, finding items with
some property, adding up numbers, printing reports, and the like. All
of
these
jobs ought to be mechanized, but it's a real nuisance to have to write a special-
purpose program in a standard language like C or Pascal each time such a task
comes up.
Awk
is
a programming language
that
makes it possible to handle such tasks
with very short programs, often only one or two lines long. An awk program
is
a sequence
of
patterns and actions that tell what to look for in the input data
and what to do when it's found. Awk searches a set of files for lines matched
by any
of
the patterns; when a matching line
is
found, the corresponding action
is
performed. A pattern can select lines
by
combinations
of
regular expressions
and comparison operations
on
strings, numbers, fields, variables, and array ele-
ments. Actions may perform arbitrary processing
on
selected lines; the action
language looks like C but there are
no
declarations, and strings and numbers
are built-in
data
types.
Awk scans the input files and splits each input line into fields automatically.
Because so many things are automatic - input, field splitting, storage manage-
ment, initialization - awk programs are usually much smaller than they would
be in a more conventional language. Thus one common use
of
awk
is
for the
kind of
data
manipulation suggested above. Programs, a line or two long, are
composed
at
the keyboard, run once, then discarded. In effect, awk
is
a
general-purpose programmable tool that can reprace a host
of
specialized tools
or programs.
The same brevity of expression and convenience
of
operations make awk
valuable for prototyping larger programs.
One starts with a
few
lines, then
refines the program until it does the desired job, experimenting with designs by
trying alternatives quickly. Since programs are short, it's easy to get started,
and easy to
start
over when experience suggests a different direction. And it's
straightforward to translate an awk program into another language once the
design
is
right.
iii
剩余224页未读,继续阅读
竹影半墙
- 粉丝: 800
- 资源: 49
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
- 3
前往页