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: 
If you want the function to be available from the command line, you need to create the function in the current shell, using the dot `.` command, or in Bash its workalike `source`:

```
$ . shellFile.sh
$ myFunction
1
$

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

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

```