The .M command replaces one or more characters in the top statement on the stack. It is a useful way to edit the most recently executed TCL statement.
Format
.M [U] / text1 / text2 |
Parameter(s)
U |
Changes all occurrences of text1 to text2. Use this option if text1 appears more than once in the statement. |
text1 |
Text string in statement 1 to be replaced. |
text2 |
Text string to be substituted for text1. |
These rules apply when using the .M command:
You must specify at least one character in text1.
The last character in text1 cannot be a space.
If text2 is not specified, text1 is deleted.
You can use any other non-numeric character in place of / as the delimiter.
Modifying the Top Statement on the Stack
The example below displays the first statement in the stack, then changes the word CUSTOMERS to NEWCUSTOMERS:
>.L1 001 LIST CUSTOMERS WITH LAST-NAME "SMITH" LAST-NAME FIRST-NAME >.M/CUSTOMERS/NEWCUSTOMERS LIST NEWCUSTOMERS WITH LAST-NAME "SMITH" LAST-NAME FIRST-NAME |
When the first stack statement is executed, it now produces a display for the file NEWCUSTOMERS instead of the file CUSTOMERS. Entering .X executes the modified statement.
See Also