I often "debug" bash scripts by opening them in the text editor and pasting them to the console, not line by line but "logical unit by logical unit".
Sometimes I then have these constructs:
if [ ! -f $inputFile ]; then
echo "You must specify an existing file, milord!"
exit 5
fi
However, pasting that to the console (without a valid $inputFile
of course) immediately closes my console.
Is there any way to circumvent that?