I am trying to learn bash. I am using ubuntu.
I want to add a function. I am not sure weather I need to create a.profile or .bash_profile file so I create both in the ~/ directory.
I add something like this in each one:
myfunc()
{
echo "function ran"
}
I log out of my user and log back in, I run this in the command line:
me@host:~$ myfunc
which just returns:
myfunc: command not found
Not sure what I am doing wrong.
source ~/.profile– Dan Jun 30 '10 at 18:07