Edlin Manual


There I was, on a project to enhance programs residing on a PC and the only editor I could use was edlin. The DOS manuals I had accessed to mentioned that edlin existed, and a few of its commands. By trial and error - and my previous line editing experience -, I figured out how to do basic editing using edlin and wrote the 3 page manual below so when the other two team members showed up in 5 weeks, I would not have to explain edlin to them. The below version has had typos corrected, as EDLIN’s spellchecker was the user’s eyes. I left the lack of grammar as is.

  
EDLIN <filename>

NOTE: a “.” period = the “current” line number
a “#” pound sign = the last line + 1

Usually
line1 will default to current (.)
line2 will default to last line + 1 (#)

the EDLIN work file is always sequences by 1s,
Deleting or Inserting will change the line #s

the target string is remembered
the replacement string is remembered

a capital letter is the command
[optional] has a default value
<lower case> replace as appropriate
<UPPER CASE> is the key stroke

Append lines [n]A

used when the file is bigger than
EDLIN’s buffer - DON’T NEED


Copy lines [<line1>],[<line2>],<line3>C NOT IN MANUAL

line1 - first line you want copied
defaults to current
line2 - last line you want copied
defaults to current
line3 - the line BELOW where you want the text
copied to
NOTE: line1 must be <= line2
line3 is required


Delete lines [<line1>][,<line2>]D

just a D will only delete the current line
NOTE: line #s will be changed


edit line [<line>]

enters intraline editing,
defaults to current + 1
a <CR> in col 1 will get you out safely.


EXIT E


Insert line [<line>]I

will insert new lines before the specified
defaults to current line
#I will add lines on to the end of the file
<CTRL-Z><CR> to quit inserting
NOTE: line #s will be changed.
NOTE: when inserting lines you are in the
intraline edit - so you cn use the function
keys to edit the line you are on.


List lines [<line1>][,<line2>]L

line1 - list from here on,
defaults to current - 11
line2 - list to here,
defaults to line1 + 22
NOTE: that an “*” just to the right of the line
number, indicates that it is the current line.


Move lines [<line1>],[<line2>],<line3>C NOT IN MANUAL

line1 - first line you want moved
defaults to current
line2 - last line you want moved
defaults to current
line3 - the line BELOW where you want the text
moved to
NOTE: line1 must be <= line2
line3 is required


Quit edit Q

leaves EDLIN without saving the work file.



Replace text [<line1>][,<line2>][?]R[<string1>]<CTRL-Z[<string2>]

? - “confirm?” Y/N
string1 - target string
defaults to last target string entered
string2 - replacement string
defaults to last replacement string entered


Search lines [<line1>][,<line2>][?]S[<string1>]

? - “confirm?” Y/N
string1 - target string
defaults to last target string entered
NOTE: sometimes line1 is equal to #
this would give a “S” command a “not found” msg


Write lines [n]W

used when the file is bigger than EDLIN’s buffer
the opposite of Append - DON’T USE.


INTRALINE EDITING

NOTE: editing begins in replace mode

all editing is controled by function keys

When you go into intraline editing, a copy of the line is
placed in a buffer call “template”.
You then used the function keys to control which characters
will be on the new line - WHAT YOU SEE IS WHAT YOU GET.

<F1> ‘copy1’ copies 1ch from the template
<F2><x> ‘copyup’ copies up to the ch <x> from the template
<F3> ‘copyall’ copies the rest of the template
<F4> ‘skip1’ skip 1ch on the template
<F5><x> ‘skipup’ skip up to the ch <x> on this template
<SHIFT-F0> ‘void’ cancels all the changes made
<F6> ‘insert’ puts you into insert mode
<F7> ‘replace’ puts you back into replace mode
<F0> ‘new’ takes all the text to left of the cursor
and puts it into the template
NOTE: <SHIFT-F0> will not recover from this

NOTE: that <F1>, <F2>, & <F3> will cancel an <F6>
that is to say - you will be back in replace mode
<F4> & <F5> will not.