home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 8 Other / 08-Other.zip / pmhuneng.zip / convert.cmd next >
OS/2 REXX Batch file  |  2001-09-12  |  1KB  |  36 lines

  1. /* convert database, 09.12.2001 */
  2.  
  3. /* Change the source and/or target table strings to customize conversion.    */
  4. /* The characters listed in the source table changed by the corresponding    */
  5. /* character below them during conversion (e.g. á -> ß).                     */
  6.  
  7. /* Változtasd meg a source és/vagy target sztringeket, ha változtani         */
  8. /* akarsz a konverzión. A source táblában található karaktereket cseréli     */
  9. /* le a program a target táblában alattuk található karakterekre (pl. á->ß). */
  10.  
  11. source_table = 'áéóöüúûôí' 
  12. target_table = 'ßΘ≤÷ⁿ·√⌡φ'
  13.  
  14. parse arg in out
  15.  
  16. if in = '' | out = '' then do
  17.     say 
  18.     say 'This program is used the replace characters in a text file.'
  19.     say 'Ezt a programot karakterek egy fájlban történô kicserélésére használjuk.'
  20.     say
  21.     say 'Usage: convert <source file to convert> <target file>'
  22.     say 'Használat: convert <forrásfájl> <kimeneti fájl>'
  23.     exit
  24. end
  25.  
  26. say
  27. say 'Conversion in progress/Folyik a konverzió'
  28. do while lines(in)
  29.     l=linein(in)
  30.     l=translate(l, target_table, source_table)
  31.     rc=lineout(out, l)
  32. end
  33. say 'Done/Kész!'
  34.  
  35. exit
  36.