All pastes #181483 Raw Edit

Anonymous

public shellscript v1 · immutable
#181483 ·published 2006-09-25 00:02 UTC
rendered paste body
[root@worm ~]# cat MainProgram.sh#!/bin/shExecute (){        echo -e "Executing $@ ...";        $@;}Execute "./getopts.sh -P 'hello world'"./getopts.sh -P 'hello world'[root@worm ~]# cat getopts.sh#!/bin/shwhile getopts "P:" ido    case "$i" in        P)                VAR="$OPTARG";                continue;;        *)                echo $usage;                exit 1;;    esacdoneecho $VAR[root@worm ~]# ./MainProgram.shExecuting ./getopts.sh -P 'hello world' ...'hellohello world