Date: Mon, 16 Feb 2004 12:08:25 -0500 (EST) From: Jerry McAllister <jerrymc@clunix.cl.msu.edu> To: etoll@vipstructures.com (Eric Toll) Cc: freebsd-questions@freebsd.org Subject: Re: Scripts Message-ID: <200402161708.i1GH8Qw19410@clunix.cl.msu.edu> In-Reply-To: <9BC86C67C3AF7646B9C5382020457A940136C5@VIP10-WIN2K> from "Eric Toll" at Feb 16, 2004 11:40:56 AM
next in thread | previous in thread | raw e-mail | index | archive | help
> > Hello FreeBSD people. > > Perhaps this is the wrong place to ask such an elemental question... > > I'm trying to feed a text file into a script. > Script is suppose to take relevant parts and output them to a new > file... > > > Script is marked executable... > > > less textfile | script.pl > > script.pl: Command not found. > > What gives?? Sounds like you don't have . in your path or haven't rehashed since you created the file 'script.pl'. Try doing ./script.pl < textfile. If that works, then try doing a rehash. I don't know which shell you are using, but with tcsh/csh just type rehash and a CR/ENTER at a prompt. When you first start the shell, it makes a hash list of all the files in your path. That is where it searches for executables each time you type in somthing at the prompt that does not begin with either . or / Typing the rehash shell command, causes it to update its hash list. Note, just using the '<' redirect command is enough to pipe the file to STDIN. You don't need any other command such as 'less'. ////jerry > > TIA > Eric >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200402161708.i1GH8Qw19410>