Linux edUse of editor Original: http://www.matrix.org.cn/thread.shtml? Topicid = 28281 & forumid = 43
EdThe editor is
LinuxThe simplest text editor in the operating system. It is an editor that edits a file in units of action, not an editor in a MS-DOS system that edits the file in units of the entire screen frame. Therefore, if you are used to the edit Editor, it may take some time to get used to it.
Ed. But this is not important, because
EdEase of use can make you get started quickly.
EdThe editor is easy to call. If you want to create a new file, you only need to input
EdThen press the Enter key:
[Titan @ localhost Titan] $Ed<-
If you want to edit an existing fileEdEnter a file name:
[Titan @ localhost Titan] $EdFilename <-
ActivateEdThe command is
EdThe command line status of the editor, which may make some beginners unfamiliar. If you enter some content at this time, the system will return ?, Indicates that you do not know what task to execute:
[Titan @ localhost Titan] $Ed<-
ABCDE <-
?
At this time, you need to specify several editor commands, which are:
A-add new content at the end of the file
I-Insert new content before the last row of the file
O-Replace the last line (whether existing or inserted) of the input file with the new content.
.-Exit the file editing mode and enter the command line mode (Note: The file is not exited at this time.
EdEditor)
W-save the file
Q-exitEdEditor
The following is an example of several commands.
[Titan @ localhost Titan] $Ed<-Activation
EdCommand
A <-tellEdI want to edit a new file
My name is Titan. <-enter the content of the first line.
And I love Perl very much. <-enter the second line of content
. <-ReturnEdCommand Line status
I <-tellEdI want to insert content before the last line
I am 24. <-insert "I am 24." between "My Name Is Titan." and "and I love Perl very much ."
. <-ReturnEdCommand Line status
C <-tellEdI want to replace the input content of the last line
I am 24 years old. <-Replace "I am 24." with "I am 24 years old." (Note: The last input is replaced here)
. <-ReturnEdCommand Line status
W readme. Text <-name the file "readme. Text" and save it. (Note: If you are editing an existing file, you only need to enter W)
Q <-completely exitEdEditor
[Titan @ localhost Titan] $ returns
LinuxCommand Line STATUS OF THE SYSTEM
The content of this file is:
[Titan @ localhost Titan] $ cat readme. Text <-
My name is Titan.
I am 24 years old.
And I love Perl vrey much.
[Titan @ localhost Titan] $
BecauseEdEditing a file always does not see the file content, and it is not as flexible as the edit under the MS-DOS, please be sure to carefully check the input content in the editing file to ensure its correctness, this avoids repeated switching between the editing status and the command line status, which wastes a lot of time.
Trackback: http://tb.blog.csdn.net/TrackBack.aspx? Postid = 1655607
Linux edUse of editor Original: http://www.matrix.org.cn/thread.shtml? Topicid = 28281 & forumid = 43
EdThe editor is
LinuxThe simplest text editor in the operating system. It is an editor that edits a file in units of action, not an editor in a MS-DOS system that edits the file in units of the entire screen frame. Therefore, if you are used to the edit Editor, it may take some time to get used to it.
Ed. But this is not important, because
EdEase of use can make you get started quickly.
EdThe editor is easy to call. If you want to create a new file, you only need to input
EdThen press the Enter key:
[Titan @ localhost Titan] $Ed<-
If you want to edit an existing fileEdEnter a file name:
[Titan @ localhost Titan] $EdFilename <-
ActivateEdThe command is
EdThe command line status of the editor, which may make some beginners unfamiliar. If you enter some content at this time, the system will return ?, Indicates that you do not know what task to execute:
[Titan @ localhost Titan] $Ed<-
ABCDE <-
?
At this time, you need to specify several editor commands, which are:
A-add new content at the end of the file
I-Insert new content before the last row of the file
O-Replace the last line (whether existing or inserted) of the input file with the new content.
.-Exit the file editing mode and enter the command line mode (Note: The file is not exited at this time.
EdEditor)
W-save the file
Q-exitEdEditor
The following is an example of several commands.
[Titan @ localhost Titan] $Ed<-Activation
EdCommand
A <-tellEdI want to edit a new file
My name is Titan. <-enter the content of the first line.
And I love Perl very much. <-enter the second line of content
. <-ReturnEdCommand Line status
I <-tellEdI want to insert content before the last line
I am 24. <-insert "I am 24." between "My Name Is Titan." and "and I love Perl very much ."
. <-ReturnEdCommand Line status
C <-tellEdI want to replace the input content of the last line
I am 24 years old. <-Replace "I am 24." with "I am 24 years old." (Note: The last input is replaced here)
. <-ReturnEdCommand Line status
W readme. Text <-name the file "readme. Text" and save it. (Note: If you are editing an existing file, you only need to enter W)
Q <-completely exitEdEditor
[Titan @ localhost Titan] $ returns
LinuxCommand Line STATUS OF THE SYSTEM
The content of this file is:
[Titan @ localhost Titan] $ cat readme. Text <-
My name is Titan.
I am 24 years old.
And I love Perl vrey much.
[Titan @ localhost Titan] $
BecauseEdEditing a file always does not see the file content, and it is not as flexible as the edit under the MS-DOS, please be sure to carefully check the input content in the editing file to ensure its correctness, this avoids repeated switching between the editing status and the command line status, which wastes a lot of time.
Trackback: http://tb.blog.csdn.net/TrackBack.aspx? Postid = 1655607