> > > > eval does the trick: > > > > SUBJECT="This is a test mail" > > WARNMSG="An error occurred" > > WARNCMD="mail -s \"${SUBJECT}\" root" > > echo "echo $WARNMSG | $WARNCMD" > > eval $WARNMSG | $WARNCMD > > oops, sorry, quotes are required here: > > eval "$WARNMSG | $WARNCMD"
well, hum you see what I mean don't you? :) eval "echo $WARNMSG | $WARNCMD" sorry for the noise -- Cédric Lucantis