MIDDLE v1.31 - copy middle part of text file |
Documentation revised 21 Oct 00 - Copyright (c) 1996-2000 by Rune Berg. TextTools Freeware. |
Contents:
Usage | Top || Next |
middle [log logfile] [option] m n [infile] [to outfile]
See Understanding The Usage Section for details.
Description | Top || Previous || Next |
middle copies infile to outfile, except the m first and the n last lines.
If infile has m+n or fewer lines, outfile will be empty.
m and n must be in the range 0..2147483647.
If you don't specify infile, middle reads from standard input.
If you don't specify outfile, middle writes to standard output.
If you don't specify logfile, middle writes error messages to standard
error.
Example | Top || Previous || Next |
The command:
middle 3 5 mydata.txt
applied to file "mydata.txt" containing:
Jan 7800
Feb 1200
Mar 19000
Apr 7600
May 21000
Jun 8000
Jul 9000
Aug 60000
Sep 55000
Oct 3500
Nov 7600
Dec 32000
prints the following to the screen:
Apr 7600
May 21000
Jun 8000
Jul 9000
Options | Top || Previous || Next |
middle recognizes the following command line options:
Option | Function |
---|---|
-v | Print version banner and usage info to standard error (or logfile, if given), then exit. |
Limitations | Top || Previous || Next |
middle runs out of memory if the specified 'middle portion' is very large.
Return Codes | Top || Previous || Next |
middle returns with one of the following codes ("error levels"):
Code | Meaning |
---|---|
0 | Success |
101 | Out of memory |
102 | Incorrect/missing command line arguments |
104 | Error opening file |
105 | I/O Error |
107 | File name clash |
For more details, see TextTools General Features.
Version History | Top || Previous |
These are the released versions of middle:
Version | Date | Changes |
---|---|---|
1.02 | 25-Feb-96 | n/a |
1.10 | 26-Sep-96 |
|
1.11 | 9-May-97 |
|
1.20 | 13-Jul-97 |
|
1.30 | 2-Jan-99 |
|
1.31 | 21-Oct-00 |
|
End of document |