Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 09 Sep 2005 12:31:44 -0700
From:      Glenn Dawson <glenn@antimatter.net>
To:        bob self <bobself@charter.net>, freebsd-questions@freebsd.org
Subject:   Re: Can't execute a script
Message-ID:  <6.2.3.4.2.20050909123028.095fce00@cobalt.antimatter.net>
In-Reply-To: <4321DC05.3050509@charter.net>
References:  <4321DC05.3050509@charter.net>

next in thread | previous in thread | raw e-mail | index | archive | help
At 12:01 PM 9/9/2005, bob self wrote:
>I have a simple test script called 'scripttest' in /root/bin:
>
>-rwxr-xr-x  1 root  wheel  121 Sep  9 14:55 scripttest
>
>my $PATH IS
>
>/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/usr/X11R6/bin:*/root/bin*
>
>
>#!/bin/sh
>echo "pinging...."
>#end of scripttest
>
>If I run "which scripttest", I get /root/bin/scripttest
>
>But if I try to run this test script I get "scripttest: Command not found."
>
>Why is that happening?

Assuming you're using csh, did you rehash after creating the script?
Did you try to execute it with it's full path? like:
/root/bin/scripttest

-Glenn


>thanks,
>Bob Self
>
>
>
>
>_______________________________________________
>freebsd-questions@freebsd.org mailing list
>http://lists.freebsd.org/mailman/listinfo/freebsd-questions
>To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"




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