Text filt
Автор: Paul Gallagher
Дата: 1995
Скачать в ZIP архиве.
1. LINE v1.3 - print specified line in a file
2. QUOTE v1.2 - Quote input for use in C/REXX code
3. TAIL v1.2 - print the last lines in a file
LINE v1.3 - print specified line in a file
==========================================
Initial version by Paul Gallagher 1995.
This REXX script is hereby placed in the public domain. Any changes
should be adequately documented, and authorship notices of prior
versions retained. As a courtesy, please e-mail modified files to
previous authors.
Contents of this file:
* Version History
* Contacting the authors
* System Requirements
* About LINE
* Using LINE
Version History
===============
95.03.09 : v1.3
- initial release, published in EDM/2 Vol 3 No 3
"REXX, the developer's best friend"
Contacting the Authors
======================
Paul Gallagher: Internet (paulpg@ibm.net)
Telephone: +61-3-566-1023.
System Requirements
===================
LINE requires REXX to be properly installed on your system.
About LINE
==========
This is the good old "print line number x" program (it actually prints line
"x" and the 3 lines before and after).
Using LINE
==========
Getting help:
LINE /?
Usage:
LINE n
Where:
n is the targetted line number
Prints a specified line number, along with the preceeding and following
3 lines of a file that is piped into the standard input stream
Example:
[C:\]type config.sys | line 5
2: PROTSHELL=C:\OS2\PMSHELL.EXE
3: SET USER_INI=C:\OS2\OS2.INI
4: SET SYSTEM_INI=C:\OS2\OS2SYS.INI
*5: SET OS2_SHELL=C:\OS2\CMD.EXE
6: SET AUTOSTART=TASKLIST,FOLDERS,LAUNCHPAD
7: SET RUNWORKPLACE=C:\OS2\PMSHELL.EXE
8: SET COMSPEC=C:\OS2\CMD.EXE
QUOTE v1.2 - Quote input for use in C/REXX code
===============================================
Initial version by Paul Gallagher 1995.
This REXX script is hereby placed in the public domain. Any changes
should be adequately documented, and authorship notices of prior
versions retained. As a courtesy, please e-mail modified files to
previous authors.
Contents of this file:
* Version History
* Contacting the authors
* System Requirements
* About QUOTE
* Using QUOTE
Version History
===============
95.03.09 : v1.2
- initial release, published in EDM/2 Vol 3 No 3
"REXX, the developer's best friend"
Contacting the Authors
======================
Paul Gallagher: Internet (paulpg@ibm.net)
Telephone: +61-3-566-1023.
System Requirements
===================
QUOTE requires REXX to be properly installed on your system.
About QUOTE
==========
This script helps you prepare text for inclusion as print statements in C/C++
or REXX programs.
It is a filter - it processes the text redircted to its standard input stream.
Output is written to standard output stream. So, use it like this:
type filename.txt | quote rexx > out.cmd
to process filename.txt for use in a REXX script
Using QUOTE
==========
Getting help: QUOTE /?
Usage:
QUOTE type
Where:
'type' is the type of quoting to perform, as follows:
QUOTE C
formats lines with printf statements
QUOTE C++
formats lines to print to cout iostream
QUOTE REXX
formats lines to print with 'Say' keyword
QUOTE REXXF
formats lines to print with 'LINEOUT' function
Example:
[C:\]type readme | QUOTE c++
cout << " OS/2 Warp Version 3" << endl;
cout << " README" << endl;
cout << "" << endl;
cout << "" << endl;
cout << " Welcome to OS/2* Warp Version 3 (OS/2 Warp)." << endl;
cout << " This README contains the latest information available." << endl;
cout << " It also contains helpful hints found in our testing." << endl;
cout << "" << endl;
cout << " The README is only one source of information provided" << endl;
cout << " with OS/2 Warp. Greater detail can be found in:" << endl;
cout << "" << endl;
(etc...)
TAIL v1.2 - print the last lines in a file
==========================================
Initial version by Paul Gallagher 1995.
This REXX script is hereby placed in the public domain. Any changes
should be adequately documented, and authorship notices of prior
versions retained. As a courtesy, please e-mail modified files to
previous authors.
Contents of this file:
* Version History
* Contacting the authors
* System Requirements
* About TAIL
* Using TAIL
Version History
===============
95.03.09 : v1.2
- initial release, published in EDM/2 Vol 3 No 3
"REXX, the developer's best friend"
Contacting the Authors
======================
Paul Gallagher: Internet (paulpg@ibm.net)
Telephone: +61-3-566-1023.
System Requirements
===================
TAIL requires REXX to be properly installed on your system.
About TAIL
==========
This is the good old "print line number x" program (it actually prints line
"x" and the 3 lines before and after).
Using TAIL
==========
Getting help: TAIL /?
Usage:
TAIL n
Where:
n is the number of lines to print
Prints the last 'n' lines of a file that is copied to the standard
input stream
Example:
[C:\]type readme | tail 5
(C) Copyright IBM Corporation 1994. All rights
reserved.