Homepage
     Computer-related issues:
            Program library
                  Programs sdir and sdirstat
                  Programs splitpath and splitenv
                  Program chendl
            System administration:
                  Installation of cdma-modem
     Law:
         Constitution of RF with subject index



CHENDL

A small free-distributed UNIX (LINUX) and DOS (MS Windows) program,
that analyses and converts end line notations of text files
adopted for these systems.



The end line format conventions of DOS (and today's MS Windows) operating systems are known to be different from that of the UNIX world (today dominated by Linux). Before ordinary \n (the line feed) symbol they incert additional \r (carriage return) symbol. While some text editors both from Unix and Windows understand correctly this difference and treat files correctly, some difficulties nevertheless appear at handling alien files in both types of systems.

The command chendl is one of the programs that can be used to solve these problems.

The command chendl is a simple mean to check which is the current state of the file and to convert it to one or another direction. At convertion to Windows it adds \r before each \n, before which there was no \r previously. At conversion to Unix it removes one \r before each \n, before which it finds it. In the case of more than one \r before \n it removes one and only one \r before \n. Note that while it prints on screen that file will be rewritten to UNIX, previous \r's can remain. To check this you can run "chendl -t" again to check the new state and run "chendl -u" to remove previous \r's.

The program is applied as follows:

1. Check the state

chendl -t file_name

2. To convert to Unix:

chendl -u file_name

3. To convert to Windows:

chendl -w file_name



The compressed tar-archive of the program.

The page created 19.11.2008.

Last modified 21.12.2008.

The current version of the program: 1.0, 17.12.2008.

Copyright (C) 2008, I. B. Smirnov.

Сайт управляется системой uCoz