/usr/bin/alt_getopt.sh is in runawk 1.6.0-2.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | # -*- mode: sh; -*-
__nl='
'
__shq (){
__cmd=`printf '%s\n' "$1" | sed "s|'|'\\\\\''|g"`
printf "%s\n" "'$__cmd'"
}
add_arg (){
if test $# -ne 2 -a $# -ne 3; then
echo 'add_arg function requires either 2 or three arguments' 1>&2
exit 10
fi
if test $# -eq 3; then
help_msg="${help_msg}$3$__nl"
fi
__i=`__shq "$1"`
__args="$__args $__i"
__i=`__shq "$2"`
__args="$__args $__i"
}
__run_alt_getopt (){
eval "alt_getopt $__args" "$@"
}
process_args (){
__args="$__args --"
for i in "$@"; do
__i=`__shq "$1"`
__args="$__args $__i"
shift
done
__cmds=`eval alt_getopt -c $__args`
eval "$__cmds"
}
|