*BSD News Article 67760


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.mel.connect.com.au!munnari.OZ.AU!news.ecn.uoknor.edu!news.wildstar.net!imci5!pull-feed.internetmci.com!news.internetMCI.com!newsfeed.internetmci.com!howland.reston.ans.net!blackbush.xlink.net!ka.sub.net!ardbeg.islay.sub.org!ardbeg.islay.sub.org!pmh
From: pmh@ardbeg.islay.sub.org (Patrick M. Hausen)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: Q: How to create executable files?
Date: 5 May 1996 17:11:18 +0200
Organization: Patrick M. Hausen - private site
Lines: 38
Message-ID: <pmh.831308715@ardbeg.islay.sub.org>
References: <4mg8td$ghv@news.aimnet.com>
NNTP-Posting-Host: localhost
X-Newsreader: NN version 6.5.0 #1 (NOV)

trh@aimnet.com (TRH TRH) writes:


>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?

You don't have "." i.e. the current directory in your command search path,
i.e. the "$PATH" environment variable or the "path" shell variable for csh.

Note, that having "." in your path is a security risk.

I have a directory called "bin" in my home directory and put all my
executables there. Then I add that to my search path in my .profile:

	PATH="$HOME/bin:$PATH"
	export PATH


The "." thing is especially confusing for MS-DOS users, since DOS searches
the path after and in addition to the current directory whereas Unix shells
search the path only.


Cheers, Paddy
-- 
Patrick M. Hausen   Gerwigstr. 11   76131 Karlsruhe   pmh@islay.sub.org
"Responsibility, n. A detachable burden easily shifted to the shoulders
  of God, Fate or Fortune, Luck, or one's neighbor" -- Ambrose Bierce