File: flip.1

package info (click to toggle)
flip 1.20-4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster
  • size: 196 kB
  • sloc: ansic: 1,186; cpp: 172; makefile: 124; sh: 61
file content (141 lines) | stat: -rw-r--r-- 5,011 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
.\" 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 <dhesi@bsu-cs.bsu.edu>.
.SH SEE ALSO
.BR unix2dos (1),
.BR dos2unix (1).