I want to write a script for both interactive and batch use. If arguments are not provided the script will ask for the users input.
Unlike here the user shouldn't be bothered if the variable is already defined by arguments.
Using parameter expansion I tried this:
${FILE="$( echo "Please provide the file:" >&2 ; read a; echo $a )"}
... but I always get a command not found
error.
Any suggestions?