MIDDLE v1.30 - copy middle part of text file |
Revised 2-Jan-99. Copyright (c) 1996-99 by Rune Berg. TextTools Freeware. |
Usage | Description | Example | Options | Limitations | Return Codes | Version History | tt_r6
Usage | Top | Next |
middle [log logfile] [option] m n [infile] [to outfile]
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.
On DOS, m and n must be in the range 0 .. 32767, on Win32 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 command line arguments |
104 | Error opening file |
105 | I/O error |
107 | File name clash |
Version History | Top | Previous |
These are the released versions:
Version | Date | Changes |
---|---|---|
1.02 | 25-Feb-96 | n/a |
1.10 | 26-Sep-96 | * Very minor changes. |
1.11 | 9-May-97 | * Bug-fix: didn't work properly when taking input from pipe or keyboard. |
1.20 | 13-Jul-97 | * Now gives proper return codes. |
1.30 | 2-Jan-99 | * Win32 version now gives coloured response texts. |
End of document |