Emacs для начинающих




Manual-e - часть 3


  Default extensions for files are:

extension text file format

.cr - UNIX type .crlf - DOS/windows type .crl - DOS/windows type (used in DOS version)

  To specify you own extension use command

-ext extension

  Other flags are used as in section '2'.

4. rusconv [options] -(dos2unix|win2unix|unix2dos|unix2win|d2u|w2u|u2d|u2w) [--] <file_list> [output_dir]

  For most often tasks - converting general russian text from DOS to UNIX, from Windows to UNIX and back - it is enough only one flag:

-dos2unix (or -d2u) - from DOS to UNIX -win2unix (or -w2u) - from Windows to UNIX -unix2dos (or -u2d) - from UNIX to DOS -unix2win (or -u2w) - from UNIX to Windows

  This flags are abbreviations. During command line parsing they are replaced by:

-dos2unix (or -d2u) by '-alt +koi -crlf2cr'

-win2unix (or -w2u) by '-win +koi -crlf2cr'

-unix2dos (or -u2d) by '-koi +alt -cr2crlf'

-unix2win (or -u2w) by '-koi +win -cr2crlf'

  Examples.

  1. Example for windows.

  Files file1.txt and file2.txt are converted from encoding KOI-8 to all other encodings. Results are placed in files file1.alt, file1.koi, file1.lat, file1.mac, file1.win, file2.alt, file2.koi, file2.lat, file2.mac, file2.win in directory e:\txt.

E:\EX>rusconv -koi +alt +koi +win +mac +lat file1.txt file2.txt e:\txt\ ** rusconv -- convertor of Russian codepages, v.3.11. ** (c)w_re -- Oleg A. Paraschenko http://beta.math.spbu.ru/~prof/w_re/ .\file1.txt -> e:\txt\file1.alt, e:\txt\file1.koi, e:\txt\file1.mac, e:\txt\file1.lat, e:\txt\file1.win: ok. .\file2.txt -> e:\txt\file2.alt, e:\txt\file2.koi, e:\txt\file2.mac, e:\txt\file2.lat, e:\txt\file2.win: ok. 2 file(s) converted.

  2. Example for windows.

  Type of lines of text network files \\server\d\files\*.txt is converted from UNIX format to DOS/windows format.

E:\EX>rusconv -cr2crlf -o \\server\d\files\*.txt ** rusconv -- convertor of Russian codepages, v.3.11. ** (c)w_re -- Oleg A. Paraschenko http://beta.math.spbu.ru/~prof/w_re/ \\server\d\files\EC-1845.TXT -> \\server\d\files\rcB180.TMP -> \\server\d\files\EC-1845.TXT: ok. \\server\d\files\HUMOR_PR.TXT -> \\server\d\files\rcB181.TMP -> \\server\d\files\HUMOR_PR.TXT: ok. \\server\d\files\NON_PAS.TXT -> \\server\d\files\rcB183.TMP -> \\server\d\files\NON_PAS.TXT: ok. 3 file(s) converted.

  3. Example for UNIX.

  Content of .html-files in directory win/

is converted from windows style of russian text to UNIX style. Results are placed in files with the same name in directory koi/.

rusconv -v -win2unix -ext html win/*.html koi/ ** rusconv -- convertor of Russian codepages, v.3.11. ** (c)w_re -- Oleg A. Paraschenko http://beta.math.spbu.ru/~prof/w_re/ win/faq.html -> koi/faq.html: ok. win/feedback.html -> koi/feedback.html: ok. win/index.html -> koi/index.html: ok. 3 file(s) converted.

  Return code.

  Number of converted files.

manual-e.html

Document created by Oleg A. Paraschenko

Last changes - 15 November 1998




Содержание  Назад  Вперед