I'm writing a small script to manage my installed JDK on a linux machine, say for example that the name of the script/function is usejdk.
I come with to ways :
usejdkis abashfunction in shell script sourced the file in.bashrcor.bash_profile.use
usejdkas the name of the shell script and add it to the~/bindirectory which is thePATH.
What is the idiomatic way to deploy a shell script on a unix machine between the two ?