Online Book Reader

Home Category

Classic Shell Scripting - Arnold Robbins [252]

By Root 1017 0
of a command.

id

Print user and group ID and name information.

date

Print the current date and time, optionally under control of a user-supplied format string.

who

Print a list of logged-on users.

stty

Manipulate the state of the current terminal device.

Text Manipulation

The following commands are used for text manipulation:

awk

An elegant and useful programming language in its own right, it is also an important component of many large shell scripts.

cat

Concatenate files.

cmp

Simple file comparison program.

cut

Cut out selected columns or fields.

dd

A more specialized program for blocking and unblocking data, and converting between ASCII and EBCDIC. dd is especially good for making raw copies of device files. Note that iconv is a better program for doing character set conversions.

echo

Print arguments to standard output.

egrep

Extended grep. Matching uses Extended Regular Expressions (EREs).

expand

Expand tabs to spaces.

fgrep

Fast grep. This program uses a different algorithm than grep for matching fixed strings. Most, but not all, Unix systems can search simultaneously for multiple fixed strings.

fmt

Simple tool for formatting text into paragraphs.

grep

From the original ed line editor's command g/ re /p, "Globally match RE and Print." Matching uses Basic Regular Expressions (BREs).

iconv

General-purpose character-encoding conversion tool.

join

Join matching records from multiple files.

less

A sophisticated interactive pager program for looking at information on a terminal, one screenful (or "page") at a time. It is now available from the GNU Project. The name is a pun on the more program.

more

The original BSD Unix interactive pager program.

pr

Format files for printing on line printers.

printf

A more sophisticated version of echo that provides control over the way each argument is printed.

sed

A stream editor, based on the original ed line editor's command set.

sort

Sort text files. Command-line arguments provide control over sort key specification and priority.

spell

A batch spellchecker. You may have aspell or ispell, with a shell script wrapper named spell, instead.

tee

Copy standard input to standard output and to one or more named output files.

tr

Transliterate, delete, or reduce runs of duplicate characters.

unexpand

Convert runs of spaces into the appropriate number of tabs.

uniq

Remove or count duplicate lines in sorted input.

wc

Count lines, words, characters, and/or bytes.

Files

The following commands work with files:

bzip2, bunzip2

Very high quality file compression and decompression.

chgrp

Change the group of files and directories.

chmod

Change the permissions (mode) of files and directories.

chown

Change the owner of files and directories.

cksum

Print a file checksum, POSIX standard algorithm.

comm

Print or omit lines that are unique or common between two sorted files.

cp

Copy files and directories.

df

Show free disk space.

diff

Compare files, showing differences.

du

Show disk block usage of files and directories.

file

Guess the type of data in a file by examining the first part of it.

find

Descend one or more directory hierarchies finding filesystem objects (files, directories, special files) that match specified criteria.

gzip, gunzip

High-quality file compression and decompression.

head

Print the first n lines of one or more files.

locate

Find a file somewhere on the system based on its name. The program uses a database of files that is usually rebuilt automatically, nightly.

ls

List files. Options control the information shown.

md5sum

Print a file checksum using the Message Digest 5 (MD5) algorithm.

mkdir

Make directories.

mktemp

Create a unique temporary file and print its name. Not universally available.


Return Main Page Previous Page Next Page

®Online Book Reader