EDLIN-----------------------------------------------------------------------

Starts Edlin, a line-oriented text editor with which you can create 
and change ASCII files. 

Edlin numbers each line of the text file that is located in memory. 
You can use Edlin to insert, modify, copy, move, and delete lines 
of the file. If you want to use a full-screen editor, use the EDIT 
command. 

SYNTAX
------
EDLIN [drive:][path] filename [/B] 

PARAMETER
---------
[drive:][path] filename 
   Specifies the location and name of an ASCII file on a disk. If 
   the file exists, Edlin opens it. If the file does not exist, 
   Edlin creates a file in memory and uses the specified location 
   and filename to create the file on a disk when you use the Edlin 
   E command. 

SWITCH
------
/B 
   Specifies that Edlin is to ignore the end-of-file character 
   (CTRL+Z). 

NOTES
-----

Maximum line length 
-------------------
Edlin accepts a maximum of 253 characters per line. 

Edlin commands 
--------------
The following is a list of Edlin commands with a brief description 
of each command: 

[line] 
   Displays the line you specify. 

? 
   Displays a list of Edlin commands. 

A 
   Loads a portion of a file into memory when insufficient memory 
   prohibits loading the entire file. 

C 
   Copies a block of consecutive lines to the line number you 
   specify. 

D 
   Deletes a block of consecutive lines. 

E 
   Writes the edited file from memory to a disk (saves the file), 
   and stops the Edlin session. 

I 
   Inserts one or more lines. 

L 
   Displays a block of consecutive lines. 

M 
   Moves a block of consecutive lines. 

P 
   Displays a file one page at a time. 

Q 
   Stops the Edlin session without writing the edited file from 
   memory to a disk. 

R 
   Searches for a string of one or more characters, and replaces 
   it. 

S 
   Searches for a string of one or more characters. 

T 
   Merges the contents of another file on a disk with the contents 
   of the file that is in memory. 

W 
   Writes the first portion of the file in memory to a disk. 

Meaning of the asterisk character in Edlin 
------------------------------------------
The asterisk (*) is used for two purposes in Edlin. When an 
asterisk appears as the only character on the display line, it is 
the Edlin prompt after which you type Edlin commands. When an 
asterisk appears after a line number on the display line, it 
indicates that the line is the current line (where the cursor is 
located). 

Meaning of a page of text 
-------------------------
A page of text is one full screen of information. With a 25-line 
screen mode, Edlin displays 24 lines of text per page. The number 
of lines per page depends on the screen mode you are using. 

Starting and stopping insert mode 
---------------------------------
To insert lines into the file in memory, use the Edlin I (insert) 
command. Once you have finished inserting lines, press ENTER and 
then CTRL+C to stop insert mode. For more information about 
inserting lines, see the Edlin I command. 

Editing keys 
------------
MS-DOS provides several editing keys that you can use to edit the 
file in memory. 

EDLIN:[line]----------------------------------------------------------------

Displays the line of text you specify. 

When you type a line number as a command, Edlin displays two lines. 
The first line contains the number you specified and its associated 
text. The second line contains the number again, followed by the 
cursor. The text on the first line of the display serves as a 
template for the second line. On the second line of the display, you 
can press ENTER to cancel the command without changing the text, 
type replacement text, or edit the line of text. 

SYNTAX
------ 
[line] 

PARAMETERS
----------
line 
   Specifies the number of the line you want Edlin to display. To 
   see the number and text of the current line, press ENTER. 

NOTE
----

Entering changes into memory 
----------------------------
After you edit a line, press ENTER to enter the changes into 
memory. 

Caution
If you press ENTER while the cursor is in the middle of a line, 
Edlin deletes the portion of the line that is between the cursor 
and the end of the line. 

For information about saving the edited file from memory to a disk, 
see the Edlin E and Edlin W commands. 

EXAMPLE
-------
Suppose that the following file is in memory and ready to edit. 
When you use the Edlin L (list) command at the Edlin prompt, Edlin 
displays the contents of the file. 

   1: Dear Mr. Muster:
   2:
   3: Congratulations on your promotion
   4: to the position of Senior Chemical
   5: Engineer. I continue to be most
   6: impressed with your work.

To edit line 6, type 6. Edlin displays the following two lines: 

   6:*impressed with your work.
   6:*_

The first line contains the specified line number and its associated 
text. The second line contains the same line number and the cursor. 

Now suppose you want to insert the word "fine" before the word 
"work" in the previous example. You can specify that Edlin is to 
redisplay a portion of the first line, beginning at the cursor 
position on the second line. First, press F2 and type W. Edlin 
displays up to, but not including, the first “w” in line 6, as 
follows: 

   6:*impressed _

Then, press F2 and type W again. Edlin displays up to, but not 
including the next "w" in line 6, as follows: 

   6:*impressed with your _

Now press the INSERT key and type FINE and then a space. Then press 
the F3 key. Edlin displays the edited line, as follows: 

   6:*impressed with your fine work._

Press ENTER to accept the change. 

At the Edlin prompt, use the Edlin L (list) command to see a display 
of the edited file now in memory. Edlin displays the following: 

   1: Dear Mr. Muster:
   2:
   3: Congratulations on your promotion
   4: to the position of Senior Chemical
   5: Engineer. I continue to be most
   6:*impressed with your fine work.

EDLIN: A(APPEND)------------------------------------------------------------

Loads a portion of a file into memory when insufficient memory 
prevents Edlin from loading the entire file. 

When you start Edlin, it reads as many lines as possible from your 
disk file into memory. If the size of your file exceeds available 
memory, you must edit your file in stages. That is, you edit the 
first part of the file, write that part of the file to your disk by 
using the W (write) command, and then load more unedited lines from 
your disk into memory. 

SYNTAX
------
[n]A 

PARAMETERS
---------- 
n 
   Specifies the number of lines you want Edlin to read into 
   memory from the disk. 

NOTES
-----

Default setting 
---------------
If you do not specify a value for n, Edlin loads lines from the 
disk file until available memory is 75-percent full. If available 
memory is already 75-percent full, Edlin loads no lines. 

Freeing extra memory 
--------------------
If available memory is already full, you may be able to free memory 
by writing a portion of the file to a disk, by stopping other 
programs, or by restarting MS-DOS after quitting MS-DOS Editor. 
Restarting MS-DOS clears memory being used by memory-resident 
programs. 

End-of-file message 
-------------------
After the A command reads the last line of the file into memory, 
Edlin displays the following message: 

   End of input file 

EXAMPLE
-------
Suppose the last 100 lines of your disk file do not fit into 
memory. After you edit the first part of the file and write a 
portion of it back to a disk, you can type the following command to 
load the remaining 100 lines into memory: 

   100a 

EDLIN: C(COPY)------------------------------------------------------

Copies a block of consecutive lines to one or more locations within 
the file in memory. 

The C command copies the block of consecutive lines you specify to 
a line number you specify. This block can be copied as many times 
as necessary. 

SYNTAX
------
[line1],[line2],line3[,count]C 

PARAMETERS
----------
line1 
   Specifies the first line you want Edlin to copy. 

line2 
   Specifies the last line you want Edlin to copy. 

line3 Specifies the line before which Edlin is to insert the 
   specified block of lines. 

count 
   Specifies the number of times you want Edlin to copy the block 
   of lines. 

NOTES
-----

Default settings 
----------------
If you omit line1 or line2, Edlin copies only the current line. You 
must include the commas on the command line even if you omit one or 
both of these parameters. 

If you omit the count parameter, Edlin copies the lines one time. 

Line renumbering 
----------------
After Edlin copies lines, you can use the Edlin L (list) command at 
the Edlin prompt to see the correctly renumbered lines. 

Overlapping line numbers 
------------------------
The line you specify for theline3 parameter cannot be part of the 
block of lines to be copied. If you overlap line numbers in this 
way, Edlin cannot complete the copy operation and displays the 
following message: 

   Entry error 

For example, the following command results in an error message: 

   3,20,15c 

EXAMPLES
--------
If you type the following command, Edlin copies lines 1 through 5 
one time, beginning on line 6: 

   1,5,6c 

Lines 6 through 10 become identical to lines 1 through 5. 

To copy the current line to line 5, use the following command: 

   ,,5c 

EDLIN: D(DELETE)------------------------------------------------------------

Deletes the block of consecutive lines you specify. 

SYNTAX
------
[line1][,line2]D 

PARAMETERS
----------
line1 
   Specifies the first line you want Edlin to delete. 
line2 
   Specifies the last line you want Edlin to delete. 

NOTES
-----

Default parameter values 
------------------------
If you omit both parameters or only the line2 parameter, Edlin 
deletes the current line. However, if you omit only the line1 
parameter, Edlin deletes the block of text that includes the current 
line through the line whose number is specified for line2. In the 
latter case, you cannot specify a line number for line2 that 
precedes the current line number. In general, the number you 
specify for line2 cannot be smaller than the number you specify for 
line1. If you omit only the line1 parameter, you need to insert a 
comma as a placeholder preceding line2, as shown in the syntax 
line. 

Line renumbering 
----------------
After Edlin deletes lines, you can use the Edlin L (list) command 
at the Edlin prompt to see the correctly renumbered lines that 
remain. 

EXAMPLES
--------
If you want Edlin to delete line 7, type: 

   7d 

If you want Edlin to delete the block of text on lines 22 through 
32, type the following command: 

   22,32d 

Finally, suppose that the number of the current line is 7. To 
specify that Edlin is to delete the block of text that includes the 
current line through line 11, type the following command: 

   ,11d 

EDLIN: E(EDLIN)-------------------------------------------------------------

Writes the current file from memory to a disk and stops the Edlin 
session. 

The E command renames the original input file on the disk with the 
.BAK extension, writes the edited file from memory to the original 
input file on the disk, and then stops the Edlin session. However, 
if the file in memory is one that you created during this session 
rather than one that Edlin loaded from a disk, Edlin does not 
create a backup (.BAK) file on the disk. 

SYNTAX
------
E 

NOTES
-----

Default drive and directory 
---------------------------
Edlin writes the edited file from memory to the drive, directory, 
and filename on a disk that you specified when you started the 
current Edlin session. If you omitted a drive name at that time, 
Edlin writes to the current drive. If you omitted a directory name 
at that time, Edlin writes to the current directory. 

Checking for disk space 
-----------------------
Before using the E command, you should be sure your disk contains 
enough free space for the entire edited file that is in memory. If 
it does not, Edlin loses part or all of the file. 

Read-only .BAK file 
-------------------
Suppose you want Edlin to save an edited file from memory to a 
disk, but the .BAK version of the file is a read-only file. In this 
case, Edlin displays a message in the following format to inform 
you that Edlin cannot replace the .BAK file: 

   Access denied  - [drive:][path] filename.BAK 

Both the original and backup versions of your file on the disk 
remain unchanged. 

EDLIN: I(INSERT)------------------------------------------------------------

Inserts lines before the line number you specify in the edited file 
in memory. 

If you are creating a new file, you must type the I command before 
you can insert a new line. Edlin displays the next line number each 
time you press ENTER. Edlin remains in insert mode until you press 
CTRL+C. 

SYNTAX
------
[line]I 

PARAMETERS
----------
line 
   Specifies the line number before which you want Edlin to insert 
   lines. The default value of line is the number of the current 
   line. 

NOTES
-----

Line renumbering 
----------------
When you quit insert mode, the line immediately following the 
inserted lines becomes the current line. You can use the Edlin L 
(list) command at the Edlin prompt to see the correctly renumbered 
lines. 

Inserting control characters 
----------------------------
To insert a control character in text, type ^V followed by the 
ASCII symbol that represents the control character. For example, to 
insert an escape character (CTRL+[), type the following: 

   ^V[ 

To insert a character that produces a tone (CTRL+G), type the 
following: 

   ^VG 

Appending text 
--------------
If the value for line exceeds the number of lines in the file you 
are editing or if you specify a number sign (#) for line, Edlin 
appends the inserted line(s) to the end of the file. In either 
case, the last line you insert becomes the current line. If only a 
portion of the file is in memory, the line is appended at the end 
of the portion in memory. 

EXAMPLES
--------
Suppose you have used the Edlin L (list) command at the Edlin 
prompt to display the following text on your screen: 

    1: Dear Mr. Muster:
    2:
    3: Congratulations on your promotion
    4: to the position of Senior Chemical
    5: Engineer. I continue to be most
    6: impressed with your work.
    7:
    8: Sincerely,
    9:
   10: S.L. Martin, President

Suppose you want to add another paragraph to the letter. To insert 
text before line 8, type 8I. Edlin displays the following: 

   8:*_

Now type the following line at the cursor on line 8: 

   8:*I think you will enjoy working with

Press ENTER at the complete of each new line and continue by typing 
the following lines: 

    9:*Mr. Lang on the new project. Please
   10:*let me know if there is anything I
   11:*can do to assist you.

Edlin displays the following: 

   12:*_

Insert a blank line by pressing ENTER and complete the insertion by 
pressing CTRL+C on the next line. You can type 1L to see the 
following correctly renumbered lines: 

    1: Dear Mr. Muster:
    2:
    3: Congratulations on your promotion
    4: to the position of Senior Chemical
    5: Engineer. I continue to be most
    6: impressed with your work.
    7:
    8: I think you will enjoy working with
    9: Mr. Lang on the new project. Please
   10: let me know if there is anything I
   11: can do to assist you.
   12:
   13:*Sincerely,
   14:
   15: S.L. Martin, President

EDLIN: L(LIST)--------------------------------------------------------------

Displays the block of consecutive lines you specify. 

SYNTAX
------
[line1][,line2] l 

PARAMETERS
----------
line1 
   Specifies the first line you want Edlin to display. 

line2 
   Specifies the last line you want Edlin to display. 

NOTES
-----

Default values
--------------
You can omit the line1 parameter, the line2 parameter, or both. The 
following list describes the default value(s) for each of these 
cases: 

o If you omit only the line1 parameter, Edlin displays up to one 
  page (full screen of text) at a time, beginning 11 lines before 
  the current line and ending with the line whose number is 
  specified in line2. When you omit only line1, you must insert a 
  comma as a placeholder. 

o If you omit only the line2 parameter, Edlin displays up to one 
  page, beginning with the line whose number is specified in line1. 

o If you use the Edlin L (List) command with no parameters, Edlin 
  displays up to one page, beginning 11 lines before the current 
  line. If you install the ANSI.SYS device driver, the number of 
  lines Edlin displays per page depends on the type of monitor you 
  have. This number might be greater than 24. 

Blocks of more than one page
----------------------------
When the block of lines you specify contains more than one page, 
Edlin displays the first page and then prompts you with the 
following message: 

   Continue (Y/N)? 

EXAMPLE
-------
To see lines 5 through 10, type the following: 

   5,10l 

EDLIN: M(MOVE)---------------------------------------------------------------

Moves the block of consecutive lines you specify to another 
location in the file in memory. 

SYNTAX
------
[line1],[line2],line3M 

[line1],+n,line3M 

PARAMETERS
----------
line1 
   Specifies the first line you want Edlin to move. 

line2 
   Specifies the last line you want Edlin to move. 

line3 
   Specifies the line before which you want Edlin to move the block 
   of lines. 

+n 
   Specifies that you want Edlin to move the block of lines that 
   begins with the line whose number is specified in line1 and 
   includes the next n lines. If you omit the line1 parameter, the 
   block of lines to be moved begins with the current line. 

NOTES
-----

Line renumbering
----------------
After Edlin moves lines, you can use the Edlin L (list) command at 
the Edlin prompt to see the correctly renumbered lines. 

Overlapping line numbers 
------------------------
The line you specify for theline3 parameter cannot be part of the 
block of lines to be moved. If you overlap line numbers in this 
way, Edlin cannot complete the move operation and displays the 
following message: 

   Entry error 

For example, the following command results in an error message: 

   5,10,8m 

EXAMPLES
--------
Suppose that the following file is in memory and ready to edit. You 
can type 1L at the Edlin prompt to see the contents of the file. 
    1: Dear Mr. Muster:
    2:
    3: Congratulations on your promotion
    4: to the position of Senior Chemical
    5: Engineer. I continue to be most
    6: impressed with your hard work.
    7:
    8: I think you will enjoy working with
    9: Mr. Lang on the new project. Please
   10: let me know if there is anything I
   11: can do to assist you.
   12:
   13: Sincerely,
   14:
   15: S.L. Martin, President
   16: Rockdale Corporation
   17: "A World Leader in Technology"

What if you prefer to have the motto at the beginning of the memo? 
You can move lines 16 and 17 before the existing line 1 by typing 
the following command: 

   16,17,1m 

Type the Edlin L (list) command at the Edlin prompt to see the 
following correctly renumbered lines: 

    1: Rockdale Corporation
    2: "A World Leader in Technology"
    3: Dear Mr. Muster:
    4:
    5: Congratulations on your promotion
    6: to the position of Senior Chemical
    7: Engineer. I continue to be most
    8: impressed with your hard work.
    9:
   10: I think you will enjoy working with
   11: Mr. Lang on the new project. Please
   12: let me know if there is anything I
   13: can do to assist you.
   14:
   15: Sincerely,
   16:
   17: S.L. Martin, President

The following command specifies that Edlin is to move the block of 
lines including the current line through the next 25 lines to 
immediately before line 100: 
   ,+25,100m 

EDLIN: P(PAGE)--------------------------------------------------------------

Displays all or part of a file, one page (full screen of text) at a 
time. 

The last line displayed per screen becomes the current line. 

SYNTAX
------
[line1][, line2]P 

PARAMETERS
----------
line1 
   Specifies the first line you want Edlin to display. 

line2 
   Specifies the last line you want Edlin to display. 

NOTES
-----

Omitting only the line1 parameter 
---------------------------------
When you omit the line1 parameter, Edlin displays a page of text 
that begins with the current line through line2. 

Omitting only the line2 parameter 
---------------------------------
When you omit the line2 parameter, Edlin displays a page of text 
that begins with the line whose number you specify for line1. 

Omitting both parameters 
------------------------
When you omit both parameters, Edlin displays a page of text that 
begins with the line after the current line. 

EXAMPLE
-------
To see lines 100 through 200, one page at a time, type the 
following command: 

   100,200p 

EDLIN: Q(QUIT)---------------------------------------------------------------

Stops the current Edlin session without writing the edited file 
from memory to a disk. 

When you use the Q command, the Edlin session stops and the MS-DOS 
prompt appears. 

To specify that Edlin is to write the edited file from memory to a 
disk before ending the current session, you must use the E (end) 
command. 

SYNTAX
------
Q 

NOTES
-----

A difference between the Q and E commands 
-----------------------------------------
Suppose that the file you are editing is one that Edlin loaded into 
memory from a disk at the beginning of this session rather than one 
that you created in memory during the session. If you use the Q 
command to quit the session, the contents of both the original input 
disk file and the .BAK version of the disk file (if one exists) 
remain unchanged. However, if you use the E command to quit the 
session and the file you are editing has changed during the 
session, the edits are saved and the original input disk file 
becomes the .BAK version. 

Quitting Edlin without writing the edited file from memory to a disk 
--------------------------------------------------------------------
Use the following procedure to quit the Edlin session without 
writing the edited file from memory to a disk: 

1. At the Edlin prompt, type Q. Edlin displays the following 
   message: 

Abort edit (Y/N)? _ 

2. Press Y (for yes). 

EDLIN: R(REPLACE)-----------------------------------------------------------

Searches a block of consecutive lines for a string of one or more 
characters you specify, and replaces each occurrence of that string 
with another string you specify. 

The last line in which the replacement occurs becomes the new 
current line. 

SYNTAX
------
[line1][,line2][?]R[string1][separator string2] 

PARAMETERS
----------
line1 
   Specifies the first line in which you want Edlin to replace the 
   string specified in string1. 

line2 
   Specifies the last line in which you want Edlin to replace the 
   string specified in string1. 

? (question mark) 
   Specifies that Edlin is to prompt you by displaying a 
   confirmation message before replacing an occurrence of the 
   string specified in string1. 

string1 
   Specifies the string that you want Edlin to replace. 

separator 
   Separates the string1 and string2 values. The only valid value 
   for this parameter is the end-of-file character (CTRL+Z). 

string2 
   Specifies the new string that is to replace each occurrence of 
   the string specified for string1. 

NOTES
-----

Command-line spacing 
--------------------
You must not insert a space between the R and any subsequent 
parameter on the command line. 

Default settings 
----------------
If you omit the line1 parameter, Edlin begins the search on the line after 
the current line. If you omit the line2 parameter, Edlin stops the search 
at the end of the file or at the end of the portion of text in memory. 

If you omit the string1 parameter, Edlin uses the more recently used of 
the following two values: the value that you specified for string1 the 
last time you used the R command or the value that you specified for string 
the last time you used the S command during this session. If you omit 
string1 and you have not used the R or S command yet during the editing 
session, the command stops. 

If you omit the string2 parameter, Edlin uses the value you specified the 
last time you used the R command during this session. If you omit the 
string2 parameter and you have not used the R command yet during this 
session, Edlin deletes all occurrences of the string that is specified 
for string1. 

Using the separator parameter 
-----------------------------
You must separate the string1 and string2 values by using the CTRL+Z key 
combination. Even if you omit string1, you need to press CTRL+Z to mark 
the beginning of string2. When you press the CTRL+Z key combination, the 
characters displayed are not “CTRL+Z”. Instead, you see the following: 

   ^Z 

Using the question mark (?) 
---------------------------
If you include the ? parameter in your command, Edlin displays the line 
containing the first occurrence of the string specified for string1 and 
prompts you by displaying the following confirmation message: 

   O.K.? _ 

If you press Y (for yes) or press ENTER, Edlin replaces this occurrence 
of the value for string1 with the value for string2 and searches for the 
next occurrence. If you press N (for no), Edlin does not replace this 
occurrence of the value for string1 and searches for the next occurrence. 

If you do not use the question mark (?) 
---------------------------------------
If you do not use the ? parameter to confirm replacements as they are made, 
Edlin makes all the replacements at once and then displays each line that 
contains a replacement. If a line contains two or more replacements, Edlin 
displays the line once for each replacement. 

EXAMPLES
--------
Suppose you want Edlin to carry out only each confirmed replacement of 
the word “mine” with the word “ours” within the first 20 lines of the 
edited file in memory. Type the first part of the command as follows, but 
do not press ENTER: 

   1,20?rmine 
   
To complete the command, press CTRL+Z (which appears on the screen as ^Z), 
type the word  OURS, and press ENTER. The complete command appears on the 
screen as follows: 

   1,20?rmine^Zours 

Suppose that the following file is in memory and ready to edit. You can 
type 1L at the Edlin prompt to see the contents of the file. 

    1: Dear Mr. Muster:
    2:
    3: Congratulations on your promotion
    4: to the position of Senior Chemical
    5: Engineer. I continue to be most
    6: impressed with your hard work.
    7:
    8: I think you will enjoy working with
    9: Mr. Lang on the new project. Please
   10: let me know if there is anything I
   11: can do to assist you.
   12:
   13: Sincerely,
   14:
   15: S.L. Martin, President
   16: Rockdale Corporation
   17: "A World Leader in Technology"

Now suppose that in lines 5 through 10 you want Edlin to replace all 
occurrences of the word "I" with the words "yours truly". Type the first 
part of the command as follows, but do not press ENTER: 

   5,10rI 
   
To complete the command, press CTRL+Z (which appears on the screen as ^Z), 
type the words "yours truly", and press ENTER. The complete command appears 
on the screen as follows: 

   5,10rI^Zyours truly 
   
Because the ? parameter is omitted, Edlin replaces the three occurrences 
of "I" without prompting you by displaying the confirmation message. When 
Edlin finishes carrying out the command, it displays the following lines, 
which are changed as a result of the three replacements: 

    5: Engineer. yours truly continue to be most
    8: yours truly think you will enjoy working with
   10: let me know if there is anything yours truly

In the previous example, two unintended replacements occurred--in lines 5 
and 8. You can avoid such changes by adding the ? parameter to the command. 
The completed command should appear on screen as follows: 

   5,10?rI^Zyours truly 
   
Now, Edlin prompts you by displaying the confirmation message for each 
occurrence of the string specified in string1 and carries out only confirmed 
replacements, as the following example shows: 

       5: Engineer. yours truly continue to be most
   O.K.? n
       8: yours truly think you will enjoy working with
   O.K.? n
     10: let me know if there is anything yours truly
   O.K.? y

When the ? parameter is used, Edlin does not automatically display the 
lines that are changed as a result of the confirmed replacements. If you 
type the Edlin L (list) command at the Edlin prompt, Edlin displays the 
edited file that is in memory, as follows: 

    1: Dear Mr. Muster:
    2:
    3: Congratulations on your promotion
    4: to the position of Senior Chemical
    5: Engineer. I continue to be most
    6: impressed with your hard work.
    7:
    8: I think you will enjoy working with
    9: Mr. Lang on the new project. Please
   10: let me know if there is anything yours truly
   11: can do to assist you.
   12:
   13: Sincerely,
   14:
   15: S.L. Martin, President
   16: Rockdale Corporation
   17: "A World Leader in Technology"

EDLIN: S(SEARCH)-----------------------------------------------------------

Searches for the string of one or more characters that you specify. 

Edlin displays the first line that contains an occurrence of the string. 
The search then stops and that line becomes the current line. 

SYNTAX
------
[line1][,line2][?]S[string] 

PARAMETERS
----------
line1 
   Specifies the first line you want Edlin to search. 
   
line2 
   Specifies the last line you want Edlin to search. 
   
? (question mark) 
   Specifies that Edlin is to prompt you by displaying a confirmation 
   message when it finds the first occurrence of the value you specify 
   for string. 
   
string 
   Specifies the string for which you want Edlin to search. You must not 
   insert a space before this parameter on the command line, unless the 
   space is part of the search text. 
   
NOTES
-----

Default settings 
----------------
If you omit the line1 parameter, Edlin starts the search on the line after 
the current line. If you omit the line2 parameter, Edlin stops the search 
at the end of the file. 

If you omit the string parameter, Edlin uses the more recently used of the 
following two values: the value that you specified for string the last time 
you used the S command, or the value that you specified for string1 the 
last time you used the R (replace) command during this session. If you omit 
the string parameter and this is your first use of an S or R command during 
this session, the S command stops immediately. 

Using the ? (question mark) 
---------------------------
If you include the ? parameter in your command, Edlin displays the line 
containing the first occurrence of the characters specified for string 
and prompts you with the following confirmation message: 

   O.K.? _ 
   
If you press Y (for yes) or press ENTER, the line displayed before the 
message becomes the current line and the search stops. If you press N 
(for no), the search continues until another occurrence is found or until 
Edlin displays the following message indicating that all lines have been 
searched: 

   Not found 
   
EXAMPLES
--------
Suppose that the following file is in memory and ready to edit. You can 
type 1L at the Edlin prompt to see the contents of the file. 

    1: Dear Mr. Muster:
    2:
    3: Congratulations on your promotion
    4: to the position of Senior Chemical
    5: Engineer. I continue to be most
    6: impressed with your hard work.
    7:
    8: I think you will enjoy working with
    9: Mr. Lang on the new project. Please
   10: let me know if there is anything I
   11: can do to assist you.
   12:
   13: Sincerely,
   14:
   15: S.L. Martin, President

To specify that Edlin is to search lines 2 through 12 for the first 
occurrence of the word “to”, type the following command: 

   2,12sto 

Edlin displays the following line: 

   4: to the position of Senior Chemical

To specify that Edlin is to display the line containing the first occurrence 
of "to" and then prompt you with a confirmation message, type the following 
command: 

   1,?sto 
   
Edlin displays the following lines: 

	4: to the position of Senior Chemical
   O.K.? _

If you press any key other than Y or ENTER, the search continues. For this 
example, press N (for no), as follows: 

   O.K.? n 

Edlin continues the search and displays the following lines:  

	5: Engineer. I continue to be most
   O.K.? _

Press Y to stop the search. 

EDLIN: T(TRANSFER)---------------------------------------------------------

Merges the contents of another file from a disk with the contents of the 
file that is in memory. 

SYNTAX
------ 
[line]T[drive:][path] filename 

PARAMETERS
---------- 
line 
   Specifies the line number before which you want Edlin to insert the file 
   it is transferring from a disk. The default value of this parameter is 
   the number of the current line. 
   
[drive:][path] filename 
   Specifies the location and name of the file you want Edlin to insert 
   before the line whose number is specified in the line parameter. The 
   default value for drive is the current drive; the default value for path 
   is the current directory. 
   
NOTE
----
After Edlin merges a file from a disk, you can use the Edlin L (list) 
command at the Edlin prompt to see the correctly renumbered lines. 

EXAMPLE
-------
To merge a file named TAXES.MEM to line 12 of the file you are editing, 
type the following command: 

   12t taxes.mem 

EDLIN: W(WRITE)--------------------------------------------------------------

Writes the first portion of the edited file from memory to a disk. 

When you start Edlin, it reads as many lines as possible from your disk 
file into memory. If the size of your file exceeds available memory, you 
must edit your file in stages. That is, you edit part of the file, write 
that part to your disk by using the W command, and then load the next part 
from disk by using the A command. 

SYNTAX
------ 
[n]W 

PARAMETERS
---------- 
n 
   Specifies the number of lines that you want Edlin to write to the disk, 
   beginning with the first line of the edited file in memory. 

NOTES
-----

How the W command works 
-----------------------
When you open a file, Edlin reads lines from disk until memory is more 
than 75-percent full. It reserves the other 25 percent for changes you 
might make to the text. If your entire file fits in memory, Edlin displays 
the following message: 

   End of input file 
   
If you see this message, you do not need to use the W and A commands. 

If Edlin does not display this message when you open a file, the size of 
the file exceeds available memory. Therefore, you must edit your file in 
stages by using the W and A commands to write and read parts of the file, 
respectively. 

The W command does not write to disk the changes you make unless it was 
actually necessary to use the W command. Therefore, if you use the W command 
even though the whole file fit into memory and then you use the Q command to 
quit Edlin, none of the changes you made to the file are saved. 

Line renumbering 
----------------
After Edlin writes the first portion of the edited file from memory to a 
disk, you can use the Edlin L (list) command at the Edlin prompt to see 
the correctly renumbered lines that remain, beginning with line number 1. 

Default setting 
---------------
If you omit the n parameter, Edlin writes lines from the edited file 
in memory to a disk until memory is 25-percent full. 

EXAMPLE
-------
Suppose the final 100 lines of your disk file do not fit into memory. After 
you edit the first part of the file, you can free enough space to load the 
remainder of your disk file into memory and continue editing by typing the 
following command: 

   125w 
   

Back to Running In The Dark