Rev 3 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
#!/bin/sh##--- write (to stdout) all the Examples from the online help-files## M.Maechler# Should work WHEREVER this is called from :cd `dirname $0`/..RHOME=`pwd`; export RHOMEMANdir=src/library/base/manFILES="`ls -A $MANdir | sed '/CVS/d;/~$/d;/\.bak$/d;/\.orig$/d'`"echo "postscript('All-Examples.ps'); iter <- 0; eigenval <- 1e-12; .Random.seed <- 1:3"for file in $FILESdoecho $file >&2sed=''if [ $file = 'on.exit' ];then sed=1; SED='$s/$/; par(opar)/'elif [ $file = 'pictex' ]; then sed=1; SED='4,$s/^/##LaTex /'elif [ $file = 'postscript' ];then sed=1; SED='/^postscript(/s/^/## /'elif [ $file = 'Random' ]; then sed=1; SED='$s/$/; .Random.seed <- 9:7/'elif [ $file = 'solve' ]; then sed=1; SED='/error:.*singular/s/^/## /'elif [ $file = 'dataentry' ];then sed=1;SED='/^d[A-z.]*(/s/^/##INTERACTIVE> /'elif [ $file = 'edit' ]; then sed=1;SED='/edit(/s/^/##INTERACTIVE> /; /^vi(/s/^/##INTERACTIVE> /'fiif [ -z "$sed" ]; then./etc/doc2EX $MANdir/$fileelse ./etc/doc2EX $MANdir/$file | sed -e "$SED"#Dbg echo "SED= «$SED»" >&2fidoneecho "dev.off(); quit('no')"