FLIP(1)
β¨ FLIP(1) β¨
okay bestie, buckle up π this one lives in the Linux Programmer's Manual, and it's the little tool that fixes the whole CR/LF drama between **IX and MS-DOS. it's giving β¨interoperabilityβ¨ and honestly? obsessed.
πΈ NAME πΈ
flip, toms, toix β do newline conversions between **IX and MS-DOS π¦
π SYNOPSIS π
flip -h
flip [ -umvtsbz] file ...
flip [ -umvtsbz] -
toix [ -vtsbz] file ...
toms [ -vtsbz] file ...
π DESCRIPTION π
so flip is a file interchange program that converts text file formats between **ix and MS-DOS. like, it converts lines ending with carriage-return (CR) and linefeed (LF) into lines ending with just linefeed, or vice versa π. and if you hand it the special argument -, it reads input from stdin and writes to stdout. main character energy fr fr.
flip has the following features, and no we are NOT skipping any of them π:
- flip will normally refuse to convert binary files. you can override this.
- when asked to convert a file to the same format it already has, flip causes no change to the file. so to convert all files to
**IXformat you can type
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, flip does not change them.
- flip preserves file timestamps. you can override this.
- flip preserves file permissions.
- flip is written in C and will compile and run under MS-DOS/Turbo C, 4.3BSD, and System V. vintage but make it slay π
- flip 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. no mess, no crumbs π§Ή
- when converting from MS-DOS to
**IXformat, 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 -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 equivalent:
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 respectively.
π₯ OPTIONS π₯
-uβ convert to**IXformat (CR LF => LF, lone CR or LF unchanged, trailing control Z removed, embedded control Z unchanged).-mβ convert to MS-DOS format (lone LF => CR LF, lone CR unchanged).-hβ give a help message.-vβ be verbose, print filenames as they are processed.-tβ touch files (don't preserve timestamps).-sβ strip high bit.-bβ convert binary files too (else binary files are left unchanged).-zβ truncate file at first control Z encountered.
ngl bestie, -b is the "i know what i'm doing" button. flip refuses binaries by default for a reason π
π AUTHOR π
Rahul Dhesi <dhesi@bsu-cs.bsu.edu>.
π SEE ALSO π
and that's the whole vibe check π«Ά this page is from Linux 2.0, dated July 20, 2002 β yeah she's a lil vintage, but she ate and left no crumbs. periodt πβ¨ππ¦
π¦ where this page comes from
- debian bookworm: flip 1.20-5 Β· GPL-1.0-only
- debian trixie: flip 1.20-5 Β· GPL-1.0-only
- ubuntu jammy: flip 1.20-5 Β· GPL-1.0-only
- ubuntu noble: flip 1.20-5 Β· GPL-1.0-only
- ubuntu resolute: flip 1.20-7 Β· GPL-1.0-only
- ubuntu stonking: flip 1.20-7 Β· GPL-1.0-only
- copyright (C) 1989 Rahul Dhesi
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms