blob: 5df6f8e350941d69aef17faf33b63594839e0532 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
#print
Another use for pipes is to replace a command sequence that we
did earlier with "cat", "pr" and a temporary file. If you have
a bunch of small files, using "pr" on them directly wastes
paper, since each file takes a page. You could say
cat memo* >temp
pr temp
rm temp
but this is a nuisance (and the output will
have the title "temp" on each page). So use
a pipe instead.
In this directory there are some files whose
names begin with "word". Use "cat", "pr" and a pipe
to print them, then type "ready".
#create word1
now
is
the
time
for
all
#create word2
good
men
to
come
to
the
aid
#create word3
of
their
party.
#copyin
#user
#uncopyin
grep 'cat word.*| *pr' <.copy >/dev/null
#log
#next
5.1d 10
|