I'm analyzing some functions in Shell Script and I came across this code:
adicionar_usuario()
{
USUARIO=$1
SENHA=$2
shift; shift;
COMENTARIO=$@
echo useradd -c "$COMENTARIO" $USUARIO
echo passwd $USUARIO $SENHA
echo "$USUARIO ($COMENTARIO) com a senha $SENHA adicionado."
}
My question is what p $@
means and what shift
is doing.