calendar preprocesses its input a bit too much
simon at its63b.UUCP
simon at its63b.UUCP
Wed Feb 11 00:59:44 AEST 1987
In article <6458 at allegra.UUCP> mp at allegra.UUCP (Mark Plotnick) writes:
>If you prefer that calendar not change lines like
> jan 28 1:30 1D451 pipelined design of a fast vax - Doug Clark from DEC
>into
> jan 28 1:30 1D451 pipelined design of a fast 1 - Doug Clark from DEC
>then try this:
>RCS file: calendar.sh,v
>diff -r1.1 -r1.2
>< (/lib/cpp calendar | egrep -f $tmp);;
>---
>> (/lib/cpp -Uvax -Uunix -Usun -Umc68000 -Umc68010 -Umc68020 calendar | egrep -f $tmp);;
> Mark Plotnick
> allegra!mp
Mmmm, yes, well... Is this not just a little bit inflexible? How about something
gross and ugly (and in the true Un+x tradition :-}) like:
(trueinum=`ls -i /bin/true | awk '{print $1}'`;
exclude=`ls -i /bin -inum $trueinum -print \
| awk '{print $2}' \
| xargs basename \
| awk '{print "-U"$1}';
/lib/cpp $exclude calendar | egrep -f $tmp);;
.
.
.
(ie, exclude all those names which are linked to /bin/true in /bin - such as
/bin/{pdp11,vax,sel,sun,GEC,....}).
Unfortunately, this only gets the machine name, not the processor name, so
things like mc680[012]0 need to be wiped out some other way. Its a pity that
BSD doesn't have uname(1) :-)
In fact, it should probably be *really* done with double-nested "eval"
statements, with the suitable {sex,quad,bi}ruple-backslash quoting stuff
instead of cheating and using all those nasty temporary variables!
:-) :-) :-)
Simon
-----
Simon Brown
Dept. of Computer Science, University of Edinburgh, Scotland, UK.
UUCP: ...!mcvax!ukc!{cstvax,its63b}!simon
JANET: simon at uk.ac.ed.{its63b,cstvax}
More information about the Comp.bugs.4bsd.ucb-fixes
mailing list