Department of Computing Imperial College
Text processing utilities

Whilst most of the following commands perform quite simple operations they can be combined together, using shell scripts and UNIX pipes (chaining the output from one command directly into the input of another), to perform extremely complex operations. Most of the following commands have mulitple flag options, and so it is best to read the manual pages.

perl
Perl is an interpreted language optimized for scanning arbitrary text files, extracting information from those text files, and printing reports based on that information. It's also a good language for many system management tasks.

awk
A pattern scanning and processing language.

sed
sed is a stream editor which copies the input filenames specified (standard input default) to the standard output, edited according to a script of commands.

cut
Remove selected fields from each line of a file.

cat
Cat reads input from files, or from standard input, and displays it on the standard output.

sort
A utility to sort and collate files.

uniq
Remove or report adjacent duplicate lines.

wc
Display a count of lines, words and characters.

tr
Apply a translation to characters, eg NEWLINE to SPACE.

grep, fgrep and egrep
Search a file for a string or regular expression.

echo
Echo arguments to the standard output.

tail
Display the last part of a file.

more
Browse or page through a text file, one screen at a time.

less
An Interactive file browser.

© CSG / 30-aug-00 / help@doc.ic.ac.uk / Top of page