#!/bin/sh siteroot=$(grep "#define SITEROOT" config.h | awk '{print $3}' | sed -e 's/"//g') twtxt=$(grep "#define TWTXT" config.h | awk '{print $3}' | sed -e 's/"//g') twt(){ self=$(mktemp) new=$(mktemp) echo "$(/sbin/date -Is)\t$@" > ${self} cat ${self} ${siteroot}${twtxt} > ${new} cp ${new} ${siteroot}${twtxt} rm ${new} rm ${self} } twt $@