[SOLVED] bash shell scripting (functions don't work )
I have a question. I can't get bash shell script functions to work in scripts. I am teaching my self bash shell scripting. I can get shell functions to work if i source the file. then the function works. If i put the function in .bashrc it works fine.
Im i do a interactive-shell on CLI it works as well.
What am i doing wrong in the script i have a simple test.
#!/bin/bash
# echo script name plus args
function scriptname {
echo "script name $0: $1 $2"
}
Last edited by serz; 06-13-2006 at 12:11 PM.
"Software is like sex: it's better when its free."
-LINUS TORVALDS