Sat Jul 13 20:17:38 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
[glibc/history.git] / printsources
blob062b837c5a24d43de2ea0e7206783a84323efbb7
1 #! /bin/csh -f
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.
10 set tocat='' topr=''
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
22 if ("$topr" != '') pr $topr
24 if ("$tocat" != '') foreach file ($tocat)
25 echo -n "==================== $file ======================"
26 cat $file
27 end
29 exit 0