jeudi 26 mars 2015

What happens if I pass too few parameters to a shell function?


I would like to ask about passing parameters into functions. I tried this:



function_name $var1 $var2


but usually (sometimes it printed error) it didn't make any difference whether I passed them or not. I mean it perfectly worked when I called it only with function_name. So my question is: Is it necessary to give there these parameters like in example above?



Aucun commentaire:

Enregistrer un commentaire