bash: <command nm> command not found

I created a script that I need to run from time to time, but get this error message. To get it working again I run this command from time to time:

export PATH="$PATH:~/scripts"

I put all my automated scripts in the /scripts directory and would like to run my scripts from any directory location. Any advice would be appreciated.

That need to be run by what, cron? ...
Why not set the path properly then?
How do you expect ~ if its not you launching the script

Try /home/username/scripts instead of ~/scripts, it won't expand ~ in the middle of a string like that.

Sorry I should have mentioned, I have 2 weeks experience with unix.

We run it manually, but maybe in the future would like to run some of my scripts using a cronjob.

Do I need to add my export line (/wo the ~) in my scripts to set the path in order for this to work? Thanks.

The contents of your scripts don't define where they are, so setting PATH=... inside them doesn't help your shell find them.

You'd put it in your ~/.bashrc, which gets executed on login and updates PATH in your own shell. That way it can actually find your scripts.

Ahhhh....got it now.

Got it all working and I'm back in happyland.

Thanks