mo/tests/function-args.env
Tyler Akins ad98577c42
Changing how functions are called
Old way:

    functionName CONTENT argument1 argument2

New way:

    echo -n "$CONTENT" | functionName argument1 argument2

This follow the Unix style more closely.
2017-11-13 10:13:56 -06:00

14 lines
166 B
Bash

name=Willy
MO_ALLOW_FUNCTION_ARGUMENTS=true
pipeTo() {
cat | "$1"
}
testArgs() {
printf "%d" "$#"
# Display all arguments
printf " %q" ${@+"$@"}
}