home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 112.lha / Files / fixslice.doc < prev    next >
Text File  |  1986-11-20  |  2KB  |  57 lines

  1.  These are 2 simple text utilities I find quite handy.
  2.  
  3.  filefix is a search and replace utility. It will replace any occurance of a
  4. string of up to 40 characters with another string. The strings can consist of
  5. characters or hex values. Wildcards are not supported, it does a literal search
  6. and replace.
  7.  filefix is not line oriented so it can be used on executable program code as
  8. well as text files.
  9.  filefix can be used in both a prompt and no prompt mode.
  10.  
  11.  Examples:
  12.  'filefix ?'                 
  13.       : print instructions and start in prompt mode
  14.  'filefix' 
  15.       : start in prompt mode
  16.  'filefix test test1 yes no'
  17.       : replace every occurance of 'yes' in file test
  18.         with 'no' in new file test1. test1 is created. 
  19.  'filefix test test1 yes no y'
  20.       : same as above except you are prompted to answer
  21.         'y' or 'n' for each replacement.
  22.  'filefix test test1 [0a] [0a][0d]'
  23.       : convert all line feeds to line feed/return                              
  24.  
  25.  Each run will give you the number of replacements, number of lines and
  26. characters in the file.
  27.  
  28. ------------------------------------------------------------------------------
  29.  
  30.   slice is useful for taking horizontal slices from a text file. By specifing a
  31. match word and a number of lines you can get the next x lines after a keyword
  32. match. This is similar to GREP except you can get several lines to determine
  33. the context of the match. Again, no wildcard support.
  34.  You can get up to 4 different slices of a text file at one time.
  35.  
  36.  Examples:
  37.  
  38.   'slice'
  39.    :print instructions
  40.  
  41.   'slice test test1 if 2'
  42.    :find every occurance of 'if' and print that line and the next 2 lines to a
  43.     new file named test1
  44.     
  45.   'slice test test1 if 2 then 3'  
  46.    :print 'if' and the next 2 lines and 'then' and the next 3 lines.
  47.  
  48.  
  49.  
  50.  Comments are welcome.
  51.  
  52.    Donald L. Wahl
  53.           
  54.   CIS  76515,1510       
  55.   BIX  dwahl
  56.   PLINK ops492
  57.