linux some url( -----I can't forget to append new...)

----->I don't forget to append new...

1:=================================

Windows 到 Linux 之旅: 系列文章概述

级别: 初级
http://www-128.ibm.com/developerworks/cn/linux/l-roadmap/index.html

============================================

2:=============append by clin003 2005-12-13====================

%%%%%%%%%%%%%%%

sed & awk.

By Dale Dougherty & Arnold Robbins; ISBN 1-56592-225-5, 432 pages.
Second Edition, March 1997.

>>>>>>>>on line book>>>>>>>

http://www.chinalinuxpub.com/doc/oreillybookself/unix/sedawk/index.htm

This book is about a set of oddly named UNIX utilities, sed and awk. These utilities have many things in common, including the use of regular expressions for pattern matching. Since pattern matching is such an important part of their use, this book explains UNIX regular expression syntax very thoroughly. Because there is a natural progression in learning from grep to sed to awk, we will be covering all three programs, although the focus is on sed and awk.

Sed and awk are tools used by users, programmers, and system administrators - anyone working with text files. Sed, so called because it is a stream editor, is perfect for applying a series of edits to a number of files. Awk, named after its developers Aho, Weinberger, and Kernighan, is a programming language that permits easy manipulation of structured data and the generation of formatted reports. This book emphasizes the POSIX definition of awk. In addition, the book briefly describes the original version of awk, before discussing three freely available versions of awk and two commercial ones, all of which implement POSIX awk.

The focus of this book is on writing scripts for sed and awk that quickly solve an assortment of problems for the user. Many of these scripts could be called "quick-fixes." In addition, we'll cover scripts that solve larger problems that require more careful design and development.

%%%%%%%%%%%%%%%

There are four hurdles on the way to mastering sed and awk. You must learn:

2.1How to use sed and awk. This is a relatively low hurdle to clear because, fortunately, sed and awk work in a very similar manner, based on the line editor ed. Chapter 2, Understanding Basic Operations, covers the mechanics of using sed and awk.

2.2To apply UNIX regular expression syntax. Using UNIX regular expression syntax for pattern matching is common to both sed and awk, and many other UNIX programs. This can be a difficult hurdle for two reasons: the syntax is arcane, and though many people have some experience using regular expressions, few have persevered to master the complete syntax. The more facile you are in using this syntax, the easier sed and awk are to use. That is why we spend a good deal of time covering regular expressions in Chapter 3, Understanding Regular Expression Syntax.

2.3How to interact with the shell. While not directly related to sed and awk themselves, managing the interaction with the command shell is often a frustrating problem, since the shell shares a number of special characters with both programs. If you can, avoid the problem by putting your script in a separate file. If not, use a Bourne-compatible shell for your scripts (the quoting rules are more straightforward), and use single quotes to contain your script. If you are using csh as your interactive shell, remember to escape any exclamation points with a backslash ("/!"). There is no other way to get csh to leave the exclamation point alone.[3]

[3] Well, you can set the histchars variable. See the csh man page.

2.4The knack of script writing. This is the most difficult, rather like a series of high hurdles. Because of this, the bulk of the book is devoted to script writing. With sed, you have to learn a set of single-letter commands. With awk, you have to learn the statements of a programming language. To get the knack of script writing, though, you simply must pore over lots of examples and, of course, must try your hand at writing scripts yourself.

If you were running the high hurdles, the ability to clear the hurdles does not win the race - clearing them swiftly does. In writing scripts, learning the scripting command set or language is simply clearing the hurdle. Acquiring the ability to attack interesting problems with your scripts is running fast enough to compete

===================================

3:======append by clin003 2005.12.13==============

Linux Gazette is an on-line WWW publication dedicated to two simple ideas:

  • Making Linux just a little more fun.
  • Sharing ideas and discoveries.

       http://www.linuxgazette.com/   

Old Format:  http://www.linuxgazette.com/index.html

============================================

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值