3.3
Table Of Contents
- Avid iNEWS Administration Guide
- Contents
- Using This Guide
- 1 - Introduction
- 2 - Connect Services
- 3 - Database Security
- 4 - Database Management
- 5 - Backing Up the iNEWS System
- 6 - Disconnects
- 7 - Troubleshooting
- A - Command References
- Programs Invoked by iNEWS
- Commands Used by Avid Personnel Only
- Linux Commands Used in iNEWS
- Console Control Commands
- Console Server Commands
- broadcast
- configure
- connect
- ctraits
- dbclean
- dbclose
- dbdev
- dbdump
- dbfree
- dblines
- dboriginal
- dbpurge (Superuser conditional)
- dbrestore
- dbserver
- dbsort
- dbtraits
- dbvisit
- dictionary
- diskclear (Superuser only)
- diskcopy
- doc
- ed
- enter
- force (Superuser only)
- grpcheck
- gtraits (Superuser only)
- help
- hogs
- idiff
- list
- list B
- list C
- list c
- list d
- list g
- list p
- list q
- list s
- list sq
- list u
- logout
- makemontab
- makeshift (Super user only)
- maketab (Superuser only)
- msgclean
- offline
- online
- otod
- reconnect
- remove
- rename (Superuser only)
- reorder
- restart
- searchtape
- send
- shutdown
- sitedump (Superuser only)
- siterestore (Superuser only)
- startup
- status
- stop
- su
- unbusy
- utraits (Super user only)
- version
- wholockedit
- Job List Commands
- Dialog Commands
- B - System Files
- C - Standard Dictionaries
- Using Dictionaries to Define Messages and Commands
- Customizing Dictionaries
- Utility Messages Dictionary (/site/dict/messages)
- DBServer Program Messages
- Disconnect Program Messages
- Category and Keyword Check Program Messages
- Keyboard Check Program Messages
- Keyboard Check Program Messages for Macros
- Grpcheck Messages
- Wire Program Messages
- Mail Server Messages
- Validation (Action) Server
- Seek Server Messages
- Last Login Messages
- Print Server Messages
- dbtraits Messages
- Save Error (Workstation) Messages
- Queues Dictionary (/site/dict/queues)
- Words Dictionary (/site/dict/words)
- Keyboard Macros Dictionary (/site/dict/keymacros)
- Case-shifting Dictionary (/site/dict/shift)
- MCS Dictionary (/site/dict/mcs)
- Job List Command Dictionary (/site/dict/joblist)
- D Messages Dictionary (/site/dict/dmessages)
- S Messages Dictionary (/site/dict/smessages)
- D - Environment Variables
- E - Managing Traits at the Console
- F - The Line Editor, ed
- Index
F The Line Editor, ed
292
Starting ed
When you modify a file, make the same changes to each server’s copy of the file, or your
system will not run properly. Select all servers before starting ed and opening a file for
editing to ensure changes you make are applied to each server’s copy of the file.
To start ed from the console:
t Type ed followed by the file path and name to be edited. For instance, to edit a copy of
the configuration file in the Site directory, you would type:
NRCS-A
$ ed /site/config.test
3624
The line editor, ed, returns a number indicating the file size expressed as the number of
characters, including spaces and returns. Also, the console prompt, NRCS-A$, changes
to no prompt when you launch the editor.
If the file name specified does not exist or is a non-text file unsuitable for editing with
ed, ed returns a question mark (?) followed by the file name. This is one way to create a
new text file. For instance, a new text file called newfile is created when the following is
typed:
NRCS-A
$ ed newfile
?newfile
c
Do not attempt to edit a non-text file such as a binary file. Doing so could cause
undesirable results.
Specifying Lines to Edit
The line you are on presently is called the current line.
Because ed is a line editor, you navigate through the file by line numbers. For instance, when
you open a file for editing, ed considers the last line in the file the current line. If you want to
view or edit a different line, you must go to that line.
For instance, you can move to the first line of the file by typing
1
and pressing Enter. To
move ahead five lines, you could type
+5
. To move back three lines, you could type
-3
.
n
The line editor, ed, will respond with a question mark (?) if you try to move beyond the last
line of the file. Additionally, you cannot type a minus (-) value greater than or equal to the
current line number, because you cannot move to a line preceding the first line in the file.