Scripts

Jerry McAllister jerrymc at clunix.cl.msu.edu
Mon Feb 16 09:38:56 PST 2004


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


More information about the freebsd-questions mailing list