Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 Jan 2008 11:00:12 -0500
From:      Robert Huff <roberthuff@rcn.com>
To:        stevefranks@ieee.org
Cc:        User Questions <freebsd-questions@freebsd.org>
Subject:   home dir executable (!/bin/sh, chmod+x) shell scripts won't run without "sh <script>"
Message-ID:  <18306.19596.939739.137416@jerusalem.litteratus.org>
In-Reply-To: <539c60b90801070752l3d0e571cq8f7b1b519e1e808c@mail.gmail.com>
References:  <539c60b90801070752l3d0e571cq8f7b1b519e1e808c@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

Steve Franks writes:

>  I keep reading about making sh scripts executable with #!/bin/sh on
>  the first line and chmod to executable.  That works with all my system
>  scripts (rc, etc.) or my system would be DOA, no doubt.  When I do it
>  in my home folder, however, running <script> gives "command not
>  found".  I've only read about 5 sites telling you how to make shell
>  scripts executable, they all say the same thing, and they all don't
>  work.  How did I get to be so special?

	"command not found" makes my first guess a PATH problem.
	What happens when you use:

> <full path>/script_name

	or

> ./script_name


					Robert Huff



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?18306.19596.939739.137416>