Changing the field delimiter

Unless you specify otherwise sort treats the one or more space characters between words as field delimiters. You may want to sort files where words are separated by another character such as a colon (:).

Use the -t option to specify another character to act as the field delimiter. For example

   -t:

specifies the colon (:) character as the delimiter.

One specific delimiter followed by another indicates an empty field. For example with a colon (: ) as a delimiter

   field0:field1::field3:field4

field2 is taken to be empty.


[Home] [Search] [Index] This site maintained by guichard@whitman.edu