First, I apologize if this comes out in HTML. I just installed Outlook 97 
for trouble-shooting purposes and haven't yet figured out how to turn off 
the "styled text" yet.... not even sure it's possible. *sigh*

[mega-clip]
But suppose we want all filenames with dates on the first of the month
(maybe bills are due?). So we use sort as a filter, piping the output of
sort to the grep command. The grep command will print ONLY those lines
that include our "grepped for" text:

$ ls | sort -M | grep 01
jan.01
jul.01
sep.01
$

Voila! Using the pipe commands, our output from the LIST command "ls" is
filtered through "sort" and then through "grep" to give us just what we
want, and nothing more: a list of filenames sorted by date, including only
the dates for the first of each month.

ls is a program, and so is sort, and so is grep. The pipes are a feature
of the shell, but we'll learn about that later.

                 ----------------------------------
Thanks for this insightful use of multiple applications and combining them 
with the pipe command. I never realized you could string these commands 
together. I see I'm going to learn a LOT from this discussion! :-)
        John

Reply via email to