All pastes #218099 Raw Edit

Plouj

public text v1 · immutable
#218099 ·published 2006-10-24 00:01 UTC
rendered paste body
#!/bin/bash
# check for the -t (testing) argument
ECHO=/usr/bin/echo
TESTING=false
EXECUTER=exec

if [ "$1" = "-t" ]; then
        $ECHO "testing"
        TESTING=true
        EXECUTER=$ECHO
fi

($EXECUTER touch /tmp/blkjaalkjsf)
($EXECUTER $ECHO printing 1...2...3)
$ECHO this command always gets executed as coded
~