In FreeBSD if you run ./script.sh it executes in a subshell. I want to change folder of the current shell at the end of the script, but this doesn't work unless you source the script. But if you source the script you can't pass parameters to it. So annoying! This is a headache for anyone who switched to FreeBSD from Linux.
What's the nice trick to pass params to a script and to run it in a current shell? There's gotta be some nifty FreeBSD workaround for this? (Not something clunky like setting environment variables, etc).
What's the nice trick to pass params to a script and to run it in a current shell? There's gotta be some nifty FreeBSD workaround for this? (Not something clunky like setting environment variables, etc).