home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 11 Util / 11-Util.zip / HEAD.ZIP / HEAD.DOC next >
Text File  |  1991-09-07  |  3KB  |  86 lines

  1.                                HEAD 1.00
  2.                                ---------
  3.  
  4.     Purpose
  5.     -------
  6.     Display head (first n lines) or tail (last n lines) of a file or
  7.     files.  HEAD is a bound character mode (non-PM) application for DOS
  8.     and OS/2.
  9.  
  10.     HEAD is for ASCII text files only.  Text lines are assumed not to
  11.     exceed 500 characters in length.
  12.  
  13.     Usage
  14.     -----
  15.     To use HEAD:
  16.  
  17.         head [/#fhnt] filespec {filespec}
  18.  
  19.     The filespecs are the names of the files to be displayed.  At least
  20.     one and up to twenty names may be given.  The names may include
  21.     paths and wildcards.
  22.  
  23.     Specify the options:
  24.  
  25.         /#      Set number of lines to be displayed.  The default is 1
  26.                 (i.e., only the first or last line of the file).
  27.  
  28.         /f      Display full text of lines.  Normally, HEAD truncates
  29.                 lines to the current screen width to prevent wraparound.
  30.  
  31.         /h      Display a header for each file (the filename).
  32.  
  33.         /n      Display the line number for each line.
  34.  
  35.         /t      Display tail of file instead of head.
  36.  
  37.     Options may be specified separately or together:
  38.  
  39.         head /h /t *.c
  40.         head /ht *.c
  41.         head /h/t *.c
  42.  
  43.     Order and case are not significant.  '-' may be used as the option
  44.     character instead of '/'.  These are all the same:
  45.  
  46.         head /ht *.c
  47.         head *.c /h -T
  48.         head -T *.c -H
  49.         head *.c -HT
  50.  
  51.  
  52.     Examples
  53.     --------
  54.     head *.c
  55.         Display first line of each C file in the current directory.
  56.  
  57.     head /3 *.c
  58.         Display first three lines of each C file in the current
  59.         directory.
  60.  
  61.     head /t *.c g:\foo\*.c
  62.         Display last line of each C file in the current directory and in
  63.         G:\FOO.
  64.  
  65.     head /htn *.c
  66.         Display last line of each C file in the current directory;
  67.         display names of files and include line numbers.
  68.  
  69.     head /hftn *.c
  70.         Same as above, but do not truncate lines longer than the current
  71.         screen width.
  72.  
  73.                           ------------------------
  74.  
  75.     This version of HEAD was written (in a hurry) by:
  76.  
  77.                                Chris Dunford
  78.                           The Cove Software Group
  79.                                 PO Box 1072
  80.                             Columbia, MD  21044
  81.                                 301/992-9371
  82.                            CompuServe 76703,2002
  83.  
  84.     The program is uncopyrighted (public domain).  There is no warranty,
  85.     express or implied.
  86.