I've written a bash script which should cd
me to a directory.
My problem is that only the directory in the subshell changes.
I've read of many similar problems to this, but I want to know if there is a solution besides using an alias, a function or sourcing the script.
If you don't understand what I mean, here's an example:
user@linux ~: cat ./myscript.sh
#!/bin/bash
cd /any/directory
user@linux ~: ./myscript.sh
user@linux ~:
Please note that my script is much longer, so I don't want to use a function!