home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 35 Internet / 35-Internet.zip / pmmrxtoo.zip / strip_xmailer.cmd < prev   
OS/2 REXX Batch file  |  1997-11-05  |  627b  |  18 lines

  1. /* strips  the line "X-Mailer:" if used as an outgoing filter for PM-Mail
  2.    ObjectRexx (REXXSAA6.0), due to usage of "PARSE CASELESS"
  3.    1997, ---rgf, wu-wien  */
  4.  
  5. PARSE ARG file                  /* get filename */
  6.  
  7. tmpString = CHARIN( file, 1, CHARS( file ) )    /* read file    */
  8. crlf = "0d0a"x                                  /* CR-LF        */
  9. PARSE CASELESS VAR tmpString before "X-Mailer:" . ( crlf ) after
  10. CALL STREAM file, "C", "OPEN REPLACE"           /* replace file */
  11. CALL CHAROUT file, ( before || after )
  12. CALL STREAM file, "C", "CLOSE"
  13. RETURN
  14.  
  15. PP: procedure
  16.     return "[" || arg( 1 ) || "]"
  17.  
  18.