Maybe I am looking at this the wrong way.. But here I what I am trying to do. Do most of my work with Java but just switched to a unix (bash) environment. I am doing this:
[~/Desktop/bashPlay]% cat myFunc
#!/bin/bash
ls2(){
echo "Hello World"
}
ls3(){
echo "Testing"
}
echo "this is a test"
ls2 # this calls a function
[~/Desktop/bashPlay]% myFunc
this is a test
Hello World
But I have two functions in my file and I want to be able to call them separately from the command line. Ie: myFunc.ls2() or even just ls2. I know that I can add the functions to my .bashrc file but is there any other way that I can execute these functions without adding them to my .bashrc?