Question: In my shellFile.sh I wrote this function:

```
#!/bin/bash
myFunction(){
echo 1
}

```

I tried to call the function from the command line this way:

```
shellFile.sh
shellFile.sh myFunction

```

After this two lines there is no output and no errors. I apologize if this question is asked before but I couldn't find it.

Answer: 
you can call your function inside your script like this

```
#!/bin/bash
myFunction(){
echo 1
}

myFunction

```

If you want to use the function interactively you can source the script, then call the function from the command line.

```
$ source shellFile.sh
$ myFunction
1

```
You need to call the function in the script:

```
#!/bin/bash
myFunction() {
    echo 1
}
myFunction

```