Ask heroes: sed scripts cannot be executed normally.

Source: Internet
Author: User
For details, see below. I created a file named input according to the instruction. The content is:
This is a Certificate Request file: keyword to be searched
It shoshould be mailed to wjiliang2009@163.com
========================================================== ==========
Certificate Subject:
/O = Grid/OU = ca-seugrid1.edu.cn/ouw.seu.edu.cn/cnw.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
Another sed script is used to insert a line after the keyword "file:". My sed script is:
# Attend. sed is used to demonstrate the sed script append
#! /Bin/sed-f
/File:/\
We attend another line.
The result of running the script is:
./Attend. sed: line 4:/com/: the file or directory does not exist.

Thank you for understanding!

All operations are as follows: [root @ localhost o_user] # cat input
This is a Certificate Request file:
It shoshould be mailed to wjiliang2009@163.com
========================================================== ==========
Certificate Subject:
/O = Grid/OU = ca-seugrid1.edu.cn/ouw.seu.edu.cn/cnw.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 is used to demonstrate the sed script append
#! /Bin/sed-f
/File:/\
We attend another line.
[Root @ localhost o_user] #./attend. sed input
./Attend. sed: line 4:/file:/: the file or directory does not exist.
[Root @ localhost o_user] #

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.