12 productivity tools: grep and find, 13 transferring and archiving files, A the vi editor – HP NonStop G-Series User Manual
Page 8: B the ed editor
12 Productivity Tools: grep and find.............................................................147
Using the -i Flag .............................................................................................................148
Extracting Lines and Saving Them in Another File ................................................................148
Deleting Lines and Saving the Output in Another File ...........................................................149
Finding and Sorting ........................................................................................................149
13 Transferring and Archiving Files..............................................................151
Copying a Directory Hierarchy to Another Directory.............................................................152
Copying a File Hierarchy to Tape.......................................................................................152
Restoring Files From a Tape to the Guardian Environment......................................................153
Create a Sample Edit File..................................................................................................157
Opening a File................................................................................................................157
Moving Within the File.....................................................................................................158
Entering New Text ...........................................................................................................158
Editing Text.....................................................................................................................159
Searching for Strings........................................................................................................161
Moving Text....................................................................................................................161
Copying Text...................................................................................................................161
Other vi Features.............................................................................................................162
Making Substitutions........................................................................................................162
Writing a Whole File or Parts of a File................................................................................163
Deleting a Block of Text....................................................................................................164
Moving and Copying Blocks of Text ..................................................................................164
Customizing Your Environment...........................................................................................164
Saving Your Customizations...............................................................................................164
Starting the ed Program....................................................................................................166
Entering Text—The a (Append) Subcommand......................................................................166
Displaying Text—The p (Print) Subcommand........................................................................167
Saving Text—The w (Write) Subcommand...........................................................................167
Saving Text Under the Same Filename...........................................................................167
Saving Text Under a Different Filename..........................................................................168
Saving Part of a File....................................................................................................168
8
Contents