.\" Hey Emacs! This file is -*- nroff -*- source. .\" .\" This manpage is copyright (C) 1989 Rahul Dhesi .\" .\" Permission is granted to make and distribute verbatim copies of this .\" manual provided the copyright notice and this permission notice are .\" preserved on all copies. .\" .\" Permission is granted to copy and distribute modified versions of this .\" manual under the conditions for verbatim copying, provided that the .\" entire resulting derived work is distributed under the terms of a .\" permission notice identical to this one .\" .\" Since the Linux kernel and libraries are constantly changing, this .\" manual page may be incorrect or out-of-date. The author(s) assume no .\" responsibility for errors or omissions, or for damages resulting from .\" the use of the information contained herein. The author(s) may not .\" have taken the same level of care in the production of this manual, .\" which is licensed free of charge, as they might when working .\" professionally. .\" .\" Formatted or processed versions of this manual, if unaccompanied by .\" the source, must acknowledge the copyright and authors of this work. .TH FLIP 1 "July 20, 2002" "Linux 2.0" "Linux Programmer's Manual" .SH NAME flip, toms, toix \- do newline conversions between **IX and MS-DOS .SH SYNOPSIS .B flip -h .br .B flip \fR[\fP -umvtsbz\fR]\fP \fIfile\fP ... .br .B flip \fR[\fP -umvtsbz\fR]\fP - .br .B toix \fR[\fP -vtsbz\fR]\fP \fIfile\fP ... .br .B toms \fR[\fP -vtsbz\fR]\fP \fIfile\fP ... .SH DESCRIPTION \fBflip\fP 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 to stdout. \fBflip\fP has the following features: .sp .RS \fBflip\fP 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, \fBflip\fP causes no change to the file. Thus to convert all files to **IX format you can type .sp .nf .\" flip -u *.* (under MS-DOS) flip \-u * .\" (under **IX) .fi .sp 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, \fBflip\fP does not change them. \fBflip\fP preserves file timestamps. You can override this. \fBflip\fP preserves file permissions. \fBflip\fP is written in C and will compile and run under MS-DOS/Turbo C, 4.3BSD, and System V. \fBflip\fP accepts wildcards and multiple filenames on the command line. If a user interrupt aborts \fBflip\fP, it does not leave behind any garbage files or cause corruption of the files being converted. When converting from MS-DOS to **IX format, \fBflip\fP 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 \fBflip\fP to recognize the first control Z found as end-of-file. \fBflip\fP can be asked to strip the high (parity) bit as it converts a file. .RE .sp \fBflip\fP is normally invoked as: .nf flip \-umhvtb file ... .fi 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 equivalent: .nf flip \-uvt *.c flip \-u \-v \-t *.c flip \-u \-vt *.c .fi On systems that allow a program to know its own name, \fBflip\fP may be renamed (or linked) to a file called toix .\" (or toix.exe under MS-DOS) for conversion to **IX format, or to a file called toms .\" (or toms.exe under MS-DOS) for conversion to MS-DOS format. When invoked with the name toix or toms, \fBflip\fP will act as if it were invoked with the \-u or \-m option respectively. .\" .\" .SH RETURN VALUE .\" On success, \fB@name@\fP returns ... .\" On error, it returns \-1, and \fIerrno\fP is set appropriately. .SH OPTIONS .IP \-u Convert to **IX format (CR LF => LF, lone CR or LF unchanged, trailing control Z removed, embedded control Z unchanged). .IP \-m Convert to MS-DOS format (lone LF => CR LF, lone CR unchanged). .IP \-h Give a help message. .IP \-v Be verbose, print filenames as they are processed. .IP \-t Touch files (don't preserve timestamps). .IP \-s Strip high bit. .IP \-b Convert binary files too (else binary files are left unchanged). .IP \-z Truncate file at first control Z encountered. .SH AUTHOR Rahul Dhesi . .SH SEE ALSO .BR unix2dos (1), .BR dos2unix (1).