My question is: What is v1,v2,v3,v4 and v5 in the below function?
They look like input parameters but I am not really sure what they are for. Can anyone explain it in a bit detail of what they do?
#!/bin/sh
compile()
{
v1="$1*z*"
v2=${2:-"$1*"}
v3=${3:-"$1*/"}
v4=${4:-"."}
v5=${5:-"."}
some other command and cd in here
}
compile libpng
compile icu "" "" source build
.
.
.
$1etc. are the arguments to the function.And, from the
bash(1)man page, EXPANSION section, Parameter Expansion subsection: