From owner-freebsd-questions@FreeBSD.ORG Mon Feb 16 09:08:29 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 1DCC916A4CE for ; Mon, 16 Feb 2004 09:08:29 -0800 (PST) Received: from clunix.cl.msu.edu (clunix.cl.msu.edu [35.9.2.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id A85A743D2F for ; Mon, 16 Feb 2004 09:08:28 -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 i1GH8Qw19410; Mon, 16 Feb 2004 12:08:26 -0500 (EST) From: Jerry McAllister Message-Id: <200402161708.i1GH8Qw19410@clunix.cl.msu.edu> To: etoll@vipstructures.com (Eric Toll) Date: Mon, 16 Feb 2004 12:08:25 -0500 (EST) In-Reply-To: <9BC86C67C3AF7646B9C5382020457A940136C5@VIP10-WIN2K> from "Eric Toll" at Feb 16, 2004 11:40:56 AM X-Mailer: ELM [version 2.5 PL2] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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:08:29 -0000 > > 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 >