I tried 3 internet examples to write a bashe shell function and call it via my xterm terminal with no success.
1-my functions are saved in a file "example" and this file is inexecutable mode.
2-inside this example file i wrote:
#!/bin/bash
function quit {
exit
}
function hello {
echo Hello!
}
3- in xterm terminal, in the folder that this file is located i called these two functions in these ways:
$./quit $./hello
and in this way:
$quit $hello
none of them work.but if i change the following function to a script (without function word) and call the FILE, it works.
Any idea, what is going on?
Thanks