EasyManua.ls Logo

Commodore PC 20 - Page 226

Commodore PC 20
494 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
\88
MS-DOS User's Reference
Sort
The Sort switches
Sorting a file
Sort
Purpose:
Reads input,
sorts
the
data,
then
writes
the
sorted
data
to
your
terminal screen,
to
a file,
or
to
another
device.
Syntax:
sort
[drive: ]
(pathname
][/r][1 +
n]
Comments:
The
sort
command
lets
you
alphabetize a file
according
to
the
character
in a
certain
column. You specify
the
file by
the
drive:
and
pathname
options.
The
two
other
sort
options,
the
Ir
and
1+
n switches,
are
described
as follows:
Ir
I+n
Reverses
the
sort, that
is,
sorts
from Z
to
A.
Sorts
the
file according
to
the
character
in
column
n,
where
n is
some
number.
If
you
do
not
specify this
switch,
the
sort
command
sorts
the
file
according
to
the
character
in
the
first column.
Note
Sort
does
not
distinguish
between
uppercase
and
lower-
case letters.
Examples:
The
following
command
reads
the
file expenses.
txt,
sorts
it
in
reverse
order,
and
writes
the
output
to
a file
named
budget.
txt:
sort
Ir
expenses.txt
budget.txt
The
following
command
pipes
the
output
of
the
dir
command
to
the
sort
filter. This filter sorts
the
directory
listing starting
with
column
14
(the
column
in
the
directory
listing
that
contains
the
file
size)
and
sends
the
output
to
the
screen.
The
result
is a
direcĀ·
tory,
sorted
by file size:
dir
I
sort
1+14
The
following
command
does
the
same thing as
the
previous
one,
except
that
the
more
filter gives
you
a
chance
to
read
the
sorted
directory
one
screenful
at
a time:
dir
I
sort
1+14
I
more
c:

Table of Contents

Related product manuals