dthacker typed (on Thu, Jun 26, 2008 at 01:58:22PM -0700):
| I'm back at the shell for scripting, without my beloved perl or even
| bash. I'm having a horrible time with shell functions, so I reduced
| it to this test case. What am I doing wrong? SCO 5.05
|
| #!/bin/sh
| echo "calling function foo"
|
| foo "Dave"
|
| foo () {
| echo "$1 is not here"
| return 0;
| }
|
| # ./test.sh
| calling function foo
| ./test.sh: foo: not found
|

You must define a shell function BEFORE you invoke it, so just move lines
2-4 of your script to the end.

--
JP