Jerry;

I'm guessing this is a $PATH issue.  It sounds to me like the "current"
directory, or "." is not in your $PATH variable. As such, the niether
shell sh nor bash,  knows where to look for the script "logins"


To execute the script from the command line you can put the ./ or full
pathc in front of the logins on the command line.  Like so:  ./logins ,
provided you are in the same directory os the script.

If you type echo $PATH,  the directory the "logins" is in , is probably
not in your $PATH.

Now, you could add "."  you your PATH variable,  but I wouldn't.  It is
considered a security risk.

What I would do is put the logins script in a non-OS utilities directory
like /usr/local/bin, or ~/bin,  and ensure those are in your PATH.

To add something to your PATH from the command line you would type
something like:  export PATH=$PATH:/usr/local/bin:~/bin

You woul also add something like the line above to your bash_profile or
.profiles, depending on your shell usage to get it updated at each login.


Cheers;

E!


Eric Wilson
> I have a scrip in my home folder named: logins
> It is listed in my home folder as:
> -rwxrwxr-x   1 hub hub      23 Jan 28 22:12 logins
>
> logins contains the following:
> #!/bin/sh
> date ; who ;
>
> This is what I get with the command:
> $ logins
> bash: logins: command not found
>
> This is what I expected:
> $ logins
> Fri Jan 28 22:24:12 CST 2005
> hub :0           Jan 17 17:37
> hub pts/1        Jan 28 22:23 (:0.0)
>
> I have tried changing the first line to #!/bin/bash
> with the same results. I used vi to edit both versions.
>
> The shell works for all the standard commands.
>
> Where did I go wrong?
>
> Thanks
>
> --
> Jerry Hubbard
> [EMAIL PROTECTED]
>
>
> _______________________________________________
> CWE-LUG mailing list
> http://www.cwelug.org/
> [email protected]
> http://lists.firepipe.net/listinfo/cwe-lug
>
>
>


_______________________________________________
CWE-LUG mailing list
http://www.cwelug.org/    
[email protected]
http://lists.firepipe.net/listinfo/cwe-lug

Reply via email to