Index of Section 1 Manual Pages

Interix / SUAflip.1Interix / SUA

FLIP(1)                 System General Commands Manual                 FLIP(1)

NAME
     flip - do newline conversions between UNIX, Apple Mac and MS-DOS/Windows

SYNOPSIS
     flip [-aAbfhmMpqstuvz] [file ...]

DESCRIPTION
     flip is a file interchange program that converts text file formats
     amongst Unix, Apple Mac and MS-DOS.  It converts lines ending with car-
     riage-return (CR) and linefeed (LF) to lines ending with just linefeed,
     or vice versa.  If the special argument "-" is given as the filename then
     input is read from stdin and written to stdout.

     flip has the following features:

     -       flip will normally refuse to convert binary files.  You can over-
             ride 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 UNIX format you can type
                                             flip -u *
             and all files will end up right, regardless of whether they were
             in MS-DOS or in UNIX format to begin with.  This also works in
             the opposite direction.

     -       If a file contains isolated CR characters for underlining or
             overprinting, flip does not change them.

     -       flip preserves file timestamps.  You can override this.

     -       flip preserves file permissions.

     -       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 UNIX 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 end-of-file.

     flip can be asked to strip the high (parity) bit as it converts a file.

     flip is normally invoked as:
                               flip -uvb 

     On your system flip may be renamed (or symbolicly linked) to a file
     called 'toix' for conversion to UNIX 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
     respectively.

OPTIONS
     -a      Convert from POSIX to Apple Mac line format.

     -A      Convert from Apple Mac to POSIX line format.

     -b      Convert binary files too (else binary files are left unchanged).

     -f      Force the conversion to happen even if the file is read-only.

     -h      Give a help message.

     -m      Convert to MS-DOS/Windows format from POSIX format (lone LF => CR
             LF, lone CR unchanged).

     -M      Same as the -u option.

     -n      Remove all NUL characters from the file.

     -o file
             Direct all output to the file file instead of the originally
             named file. With this option only one file may be listed for con-
             version.

     -p      Direct all output to standard output instead of to a file. The
             files listed as arguments to this command are left unchanged.

     -q      Be quiet and suppress all messages.

     -s      Strip high bit.

     -t      Touch files (don't preserve timestamps).

     -u      Convert to UNIX format from MS-DOS/Windows format (CR LF => LF,
             lone CR or LF unchanged, trailing cntl-Z removed, embedded cntl-Z
             unchanged).

     -v      Be verbose, print filenames as they are processed.

     -z      Truncate file at first cntl-Z encountered.

DIAGNOSTICS
     The flip utility shall exit with one of the following values: 0 when suc-
     cessful and >0 when not successful.

ENVIRONMENT
     No environment variables are used.

AUTHOR
     Rahul Dhesi . (Who retains copyright).

NOTES
     This version has been enhanced with additional functionality for Interix.

     While the Apple Mac (Macintosh) used the LF CR line endings, the newer
     Apple OS (based on FreeBSD) uses conventional Unix line endings.

SEE ALSO
     ed(1), tr(1), sed(1), vi(1)

Interix                          July 15, 2008                         Interix

Interix / SUAHosted at SUA Community for Interix, SUA and SFUInterix / SUA