O'Reilly logo

Mac OS X Tiger in a Nutshell by Jason McIntosh, Chuck Toporek, Chris Stone, Andy Lester

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

tab2space

Synopsis

tab2space { -h | -help }
tab2space [-crlf | -cr | -lf | -dos | -mac | -unix] [-tinteger | -tabs] [input_file [output_file]]

Converts tabs to spaces in text files, and also converts line endings.

Options

-cr

Converts line endings to carriage return (CR) characters, which is the standard for Mac OS.

-crlf

Converts line endings to CR/LF combinations, which is the standard for DOS and Windows. This is the default for tab2space.

-dos

Same as -crlf.

-h, -help

Prints a usage statement to standard output.

-lf

Converts line endings to linefeed (LF) characters, which is the standard for Unix.

-mac

Same as -cr.

-t

Converts tabs to the specified number of spaces. Defaults to 4.

-tabs

Disables conversion of tabs to spaces.

-unix

Same as -lf.

input_file

The file on which tab2space operates. If no input_file is specified, the command operates on standard input, and sends converted text to standard output.

output_file

The file to which tab2space sends converted output. Defaults to standard output.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required