Rev 11384 | Blame | Last modification | View Log | Download | RSS feed
#! /bin/sh## Diff ``without R version''## usage: Rdiff from-file to-file exitstatus## from-file equal to `-' means STDINffile=${1}tfile=${2}exitstatus=${3}## sed script to get rid of the startup messagescript='/^R : Copyright/,/quit R.$/{d;}'## egrep pattern to get rid of some more???pattern='(^Number of.*:|^Time 'if test -n "`echo ${ffile} | grep primitive-funs`"; thenpattern=${pattern}'|^\[1\] [19][0-9][0-9])'elsepattern=${pattern}')'fitmpfile=${TMPDIR:-/tmp}/${ffile}-d.${$}if test ${ffile} = '-' ; thenffile=''fised -e "${script}" ${ffile} | egrep -v "${pattern}" > ${tmpfile}(sed -e "${script}" ${tfile} | \egrep -v "${pattern}" | \diff -bw ${tmpfile} - ) && exitstatus=0rm -f ${tmpfile}exit ${exitstatus}