Return to BSD News archive
Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.cs.su.oz.au!metro!metro!munnari.OZ.AU!news.hawaii.edu!news.uoregon.edu!vixen.cso.uiuc.edu!newsfeed.internetmci.com!info.ucla.edu!news.ucdavis.edu!bullwinkle.ucdavis.edu!not-for-mail From: fzshenau@bullwinkle.ucdavis.edu (Gregory Shenaut) Newsgroups: comp.unix.bsd.bsdi.misc Subject: Re: Q: How to create executable files? Date: 5 May 1996 01:41:32 GMT Organization: University of California, Davis Lines: 37 Message-ID: <4mh10c$dfd@mark.ucdavis.edu> References: <4mg599$clu@news.aimnet.com> <4mgm2j$g1t@PaperBoy.LiveNet.Net> NNTP-Posting-Host: bullwinkle.ucdavis.edu X-Newsreader: TIN [UNIX 1.3 950824BETA PL0] Jim Sloan (jsloan@LiveNet.Net) wrote: : In article <4mg599$clu@news.aimnet.com>, trh@aimnet.com (TRH TRH) wrote: : >I am trying to create small executable files. For example something like : > : >elm -s trh $1 < $1 : > : >After typing it into a file and issuing comand chmod +x on that file : >I expect it to work with a parameter I supply in lieu of '$1'. : > : >It does not work on a new account that is running BSD. It does : >run on SunOS, AIX etc. : > : >I get the error message 'comand not found'. : > : >What am I doing wrong? : : two things, since current directory is NOT part of the path by default in BSD : (SunOS, AIX, Linux and other SysV type *nix OSes it is), then the correct : procedure is ./commandname Yes, this is probably the problem. : on the otherhand, if the file is in the user path, : then it isn't in the locate db yet. run /usr/libexec/locate.updatedb for it : to be added and it will be found in the path then. I don't think this is relevant--the locate database is just a fast way to locate a file in the file hierarchy--it has nothing to do with the search path for commands. Other possibilities besides not setting execute permission on the script include attempting to execute a command inside the script which isn't on the search path, and having a "#!shell" on the first line with the wrong path given (e.g., "#!/usr/ucb/csh"). -- Greg Shenaut -- gkshenaut@ucdavis.edu