All pastes #181476 Raw Edit

Someone

public shellscript v1 · immutable
#181476 ·published 2006-09-24 23:54 UTC
rendered paste body
#!/bin/sh -xvExecute (){        echo -e "Executing $@ ...";        $@;}Execute "./getopts.sh -P 'hello world'"+ Execute ./getopts.sh -P 'hello world'+ echo -e Executing ./getopts.sh -P 'hello world' ...Executing ./getopts.sh -P 'hello world' ...+ ./getopts.sh -P 'hello world'#!/bin/sh  -xvwhile getopts "P:" ido    case "$i" in        P)                VAR=$OPTARG;                continue;;        *)                echo $usage;                exit 1;;    esacdone+ getopts P: i+ VAR='hello+ continue+ getopts P: iecho $VAR+ echo 'hello'hello#./getopts.sh -P 'hello world'