I recently started using "function" and "case" in linux but I came across a slight problem
My code:
Code:
function Return { echo $1 } case "$1" in "" ) echo "give parameters please";; [0-9]* ) echo "No numbers please";; * ) Return;;
So whenever the first parameter is a simple word I would like it returned, but it seems like there is no returned string (empty space)
Also I know I can just write "echo $1" instead of Return, but I'd like to use a function for this.
Can anyone tell me why the function doesn't return $1? Thanks!