]>
Commit | Line | Data |
---|---|---|
28f540f4 RM |
1 | #! /bin/csh -f |
2 | ||
3 | # | |
4 | # Prints all the files given as arguments. | |
5 | # Files that will fit on less than a printed page | |
6 | # are concatenated together. Bigger ones are pr'd. | |
7 | # | |
8 | ||
9 | ||
10 | set tocat='' topr='' | |
11 | ||
12 | foreach file ($*) | |
13 | set lines=`wc -l $file | sed "s/$file//"` | |
14 | if ($lines > 40) then | |
15 | set topr=($topr $file) | |
16 | else | |
17 | set tocat=($tocat $file) | |
18 | endif | |
19 | end | |
20 | ||
21 | ||
22 | if ("$topr" != '') pr $topr | |
23 | ||
24 | if ("$tocat" != '') foreach file ($tocat) | |
25 | echo -n "==================== $file ======================" | |
26 | cat $file | |
27 | end | |
28 | ||
29 | exit 0 |