[LBo] Running shell script
Rafi Gabzu
rafi.gabzu at gmail.com
Fri Jan 5 21:29:14 CET 2007
How do I add it permanently ?
In the $HOME/.bashrc I do not see the PATH variable, I see it in the
/etc/profile (there it configure PATH for root and for user)
Thanks.
On 1/5/07, Chris F.A. Johnson <cfajohnson at teksavvy.com> wrote:
>
> On Fri, 5 Jan 2007, Rafi Gabzu wrote:
>
> > I probably missed something , why in order to run shell script I
> > need to use the dot and back slash :(e.g ./hello.sh ) ? why not just
> to
> > run it ...?
>
> You can either use ./scriptname (that's a slash, not a backslash),
> or you can put the script in a directory that is included in your
> PATH. I recommend that you do the latter.
>
> The shell looks in the directories in your PATH variable (a
> colon-separated list of directories), and the current directory is
> not usually included (nor should it be).
>
> I recommend that you create your own directory (e.g., $HOME/bin)
> and add it to your PATH in $HOME/.bashrc:
>
> PATH=$PATH:$HOME/bin
>
> --
> Chris F.A. Johnson <http://cfaj.freeshell.org>
> ===================================================================
> Author:
> Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
> --
> QnA mailing list - To post: QnA at linuxbasics.org
> Site: http://LinuxBasics.org
> List-options: http://LinuxBasics.org/cgi-bin/mailman/listinfo/qna
>
More information about the QnA
mailing list