我按照教参上写的 建立一个名为input的文件,内容是:
This is a Certificate Request file: 《===要找的关键字
It should be mailed to wjiliang2009@163.com
=================================================
Certificate Subject:
/o=Grid/OU=CA-seugrid1.edu.cn/Ou=seu.edu.cn/CN=globus
The above string is known as your user certificate subject,and it uniquely identifies
this user.$88
To install this user certificate,please save this e-mail message into the following file.
/home/globus/.globus/usercert.pem
又做了一个sed脚本 想在关键字“ file:”后换行插入 一行,我的sed脚本是:
#attend.sed 用来演示sed脚本追加文
#!/bin/sed -f
/file:/ a\
We attend another line.
运行脚本 结果为:
./attend.sed: line 4: /com/: 没有那个文件或目录
请明白的帮帮小弟 ,小弟新手刚入门 谢谢啦 !
下边是全部操作:[root@localhost o_user]# cat input
This is a Certificate Request file:
It should be mailed to wjiliang2009@163.com
=================================================
Certificate Subject:
/o=Grid/OU=CA-seugrid1.edu.cn/Ou=seu.edu.cn/CN=globus
The above string is known as your user certificate subject,and it uniquely identifies
this user.$88
To install this user certificate,please save this e-mail message into the following file.
/home/globus/.globus/usercert.pem
[root@localhost o_user]# cat attend.sed
#attend.sed 用来演示sed脚本追加文
#!/bin/sed -f
/file:/ a\
We attend another line.
[root@localhost o_user]# ./attend.sed input
./attend.sed: line 4: /file:/: 没有那个文件或目录
[root@localhost o_user]#