flip, toms, toix - do newline conversions between **IX and MS-DOS
flip [ -umvtsbz] file ...
flip [ -umvtsbz] -
toix [ -vtsbz] file ...
toms [ -vtsbz] file ...
is a file interchange program that converts text file formats
between **ix and MS-DOS. It converts lines ending with carriage-return (CR)
and linefeed (LF) to lines ending with just linefeed, or vice versa. If the
special argument "-" is given, input is read from stdin and written
has the following features:
will normally refuse to convert
binary files. You can override this.
When asked to convert a file to the same format that it already has, flip
causes no change to the file. Thus to convert all files to **IX format you can
flip -u *
and all files will end up right, regardless of whether they were in MS-DOS or in
**IX format to begin with. This also works in the opposite direction.
If a file contains isolated CR characters for underlining or overprinting,
does not change them.
preserves file timestamps. You can override this.
preserves file permissions.
is written in C and will compile and run under MS-DOS/Turbo C,
4.3BSD, and System V.
accepts wildcards and multiple filenames on the command line.
If a user interrupt aborts flip
, it does not leave behind any garbage
files or cause corruption of the files being converted.
When converting from MS-DOS to **IX format, flip
removes any trailing
control Z (the last character in the file), but leaves embedded control Z
characters unchanged. This minimizes the possibility of accidentally
converting a binary file that contains a control Z near the beginning. You can
override this and ask flip
to recognize the first control Z found as
can be asked to strip the high (parity) bit as it converts a
is normally invoked as:
flip -umhvtb file ...
One of -u, -m, or -h is required. Switches may be given separately or combined
together after a dash. For example, the three command lines given below are
flip -uvt *.c
flip -u -v -t *.c
flip -u -vt *.c
On systems that allow a program to know its own name, flip
may be renamed
(or linked) to a file called toix for conversion to **IX format, or to a file
called toms for conversion to MS-DOS format. When invoked with the name toix
or toms, flip
will act as if it were invoked with the -u or -m option
- Convert to **IX format (CR LF => LF, lone CR or LF
unchanged, trailing control Z removed, embedded control Z unchanged).
- Convert to MS-DOS format (lone LF => CR LF, lone CR
- Give a help message.
- Be verbose, print filenames as they are processed.
- Touch files (don't preserve timestamps).
- Strip high bit.
- Convert binary files too (else binary files are left
- Truncate file at first control Z encountered.
Rahul Dhesi <firstname.lastname@example.org>.