From owner-freebsd-questions@FreeBSD.ORG Mon Feb 16 09:38:56 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7079B16A4CE for ; Mon, 16 Feb 2004 09:38:56 -0800 (PST) Received: from clunix.cl.msu.edu (clunix.cl.msu.edu [35.9.2.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0742F43D1D for ; Mon, 16 Feb 2004 09:38:56 -0800 (PST) (envelope-from jerrymc@clunix.cl.msu.edu) Received: (from jerrymc@localhost) by clunix.cl.msu.edu (8.11.7p1+Sun/8.11.7) id i1GHcpK19495; Mon, 16 Feb 2004 12:38:52 -0500 (EST) From: Jerry McAllister Message-Id: <200402161738.i1GHcpK19495@clunix.cl.msu.edu> To: jan.muenther@nruns.com Date: Mon, 16 Feb 2004 12:38:51 -0500 (EST) In-Reply-To: <20040216172752.GA2407@ergo.nruns.com> from "jan.muenther@nruns.com" at Feb 16, 2004 06:27:52 PM X-Mailer: ELM [version 2.5 PL2] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: Jerry McAllister cc: Eric Toll cc: freebsd-questions@freebsd.org Subject: Re: Scripts X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Feb 2004 17:38:56 -0000 > > > Firstly, the abuse of 'cat' as I suggested is quite wonky, indeed. > I still sometimes do it like that though, for no reason other than typing > quicker than I think at times. > > > Sounds like you don't have . in your path or haven't rehashed > > since you created the file 'script.pl'. > > I just wanted to say quickly that I'd recommend *not* ever taking '.' into > your path - when someone wants you to execute something and places it into a > directory where both have write rights and names it like the binary you're > supposed to call, it's going to get executed first. I would agree that there are good reasons to not put '.' in your path. It was relevant to the question, but I should have added the warning about that comment. Doing ./script.pl < textfile is the solution. Also didn't mention that script.pl needs to have the proper line at the start. Probably #!/usr/bin/perl or wherever the questinoer has perl installed presuming from the file name that it is a perl script. ////jerry