flip

NAME

flip - do newline conversions between POSIX text files and MS-DOS

SYNOPSIS

flip -h

flip {-a|-A|-m|-M|-u} [-bnpvtsz ] [file ...]

DESCRIPTION

The flip(1) utility is a file interchange program that converts text-file formats between POSIX and other formats (MS-DOS and Apple Macintosh). The flip(1) utility converts lines ending with carriage-return (CR) and linefeed (LF) (MS-DOS) or just carriage-return (Apple) to lines ending with just linefeed, or vice versa.

If no file is specified, or if the file is specified as -, flip(1) reads the standard input. When flip(1) reads from standard input, it writes to standard output. If you mix files and standard input in the list of operands, files are converted in place and standard input is converted and then written to standard output.

FEATURES

The flip(1) utility is normally invoked as:

flip -umhvtb file ...

One of the following is required: -A, -a, -u, -m, or -h. Switches can be given separately or combined together after a dash. For example, the three command lines given below are equivalent:

flip -uvt *.c
flip -u -v -t *.c
flip -u -vt *.c

The meanings of the switches are as follows.

-a
Convert from POSIX to Apple format (LF => CR).
-A
Convert from Apple to POSIX format (CR => LF).
-b
Also convert binary files. (Otherwise, binary files are left unchanged.)
-h
Display a help message.
-m
Convert from POSIX format to MS-DOS format (lone LF => CR LF, lone CR unchanged).
-M
Convert from MS-DOS format to POSIX format (CR LF => LF, lone CR or LF unchanged, trailing control-Z removed, embedded control-Z unchanged).
-n
Remove all NUL characters during the conversion.
-p
Print all output to stdout. Files named on the command line are unchanged.
-q
Quiet mode. Suppress all messages.
-s
Strip high bit.
-t
Touch files (do not preserve timestamps).
-u
Convert from MS-DOS to POSIX format (CR LF => LF, lone CR or LF unchanged, trailing control-Z removed, embedded control-Z unchanged). This option is identical to -M.
-v
Verbose option, print file names to standard error as they are processed.
-z
Truncate file at first control-Z encountered.

On systems that allow a program to know its own name, flip(1) can be renamed (or linked) to a file called toix(1) for conversion to POSIX format, or to a file called toms(1) for conversion to MS-DOS format. When invoked with the name toix(1) or toms(1), flip(1) will act as though it were invoked with the -u or -m option, respectively.

COPYRIGHT

Both this documentation and flip(1) are Copyright 1989 Rahul Dhesi, all rights reserved. Permission is granted to copy, use, and distribute for any commercial or noncommercial purpose in accordance with the requirements of version 1.0 of the GNU General Public license

Note: This software has not been endorsed by the Free Software Foundation, the creator of the GNU license, and I am not affiliated with that organization.

This version has been modified for Interix.

AUTHOR

Rahul Dhesi