Date: Sun, 14 Mar 1999 18:01:59 +0100 From: "Pål Sommerhein" <pms@jancomulti.com> To: Kenneth Legg <sce04020@mail.wvnet.edu> Cc: BSD mailing list <FreeBSD-questions@FreeBSD.ORG> Subject: Re: vi: command not found Message-ID: <36EBEB87.7814D131@jancomulti.com> References: <36EBDEDB.89E7A40D@mail.wvnet.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?36EBEB87.7814D131>