范云龙

博客园 首页 联系 订阅 管理

$cat text

find the Match statement
Consult the Get statement
using the Read statement to retrieve data

/the .* statement/{
h
s/.*the \(.*\) statement.*/\1/
y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/
G
s/\(.*\)\n\(.*the \).*\( statement.*\)/\2\1\3/
}

 

$sed -f sedsrc text
find the MATCH statement
Consult the GET statement
using the READ statement to retrieve data


 

 

# 将语句的名字编程大写形式
/the .*statement/{
    s/\(.*the\) \(.*\) \(statement.*\)/\1 \U\2\E \3/
}

$sed -f 4.sedsrc text 
find the MATCH statement
Consult the GET statement
using the READ statement to retrieve data

 

posted on 2015-09-09 19:39  范云龙  阅读(425)  评论(0编辑  收藏  举报