Date: Mon, 16 Feb 2004 12:38:51 -0500 (EST) From: Jerry McAllister <jerrymc@clunix.cl.msu.edu> To: jan.muenther@nruns.com Cc: freebsd-questions@freebsd.org Subject: Re: Scripts Message-ID: <200402161738.i1GHcpK19495@clunix.cl.msu.edu> In-Reply-To: <20040216172752.GA2407@ergo.nruns.com> from "jan.muenther@nruns.com" at Feb 16, 2004 06:27:52 PM
next in thread | previous in thread | raw e-mail | index | archive | help
> > > 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200402161738.i1GHcpK19495>