From owner-freebsd-questions Sun Mar 14 9: 4:55 1999 Delivered-To: freebsd-questions@freebsd.org Received: from pc16s121r4.jancomulti.com (pc16s121r4.jancomulti.com [195.139.121.16]) by hub.freebsd.org (Postfix) with ESMTP id 1DDF414C93 for ; Sun, 14 Mar 1999 09:04:52 -0800 (PST) (envelope-from pms@jancomulti.com) Received: from jancomulti.com (localhost [127.0.0.1]) by pc16s121r4.jancomulti.com (8.8.8/8.8.8) with ESMTP id SAA03259; Sun, 14 Mar 1999 18:01:59 +0100 (CET) (envelope-from pms@jancomulti.com) Message-ID: <36EBEB87.7814D131@jancomulti.com> Date: Sun, 14 Mar 1999 18:01:59 +0100 From: "Pål Sommerhein" X-Mailer: Mozilla 4.07 [en] (X11; I; FreeBSD 2.2.8-STABLE i386) MIME-Version: 1.0 To: Kenneth Legg Cc: BSD mailing list Subject: Re: vi: command not found References: <36EBDEDB.89E7A40D@mail.wvnet.edu> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Kenneth Legg wrote: > > I write a script in vi and make it executable, using chmod +x filename > or chmod 777 filename, but when I try to execute the script by typing > the script name I > get the error message: Command not found. What am I doing wrong. Hi The directory where your file resides is not in your PATH environment variable. The solution is to type: ./filename If this script will be in regular use, I suggest you make yourself a directory bin in your home directory. Then put your scripts there. The ~/bin directory should be included in your PATH environment variable by default. If it is, you can start up your script from any directory by just typing: scriptname Hope this helps, Paal To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message