From owner-freebsd-questions Sun Sep 6 18:04:38 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id SAA18893 for freebsd-questions-outgoing; Sun, 6 Sep 1998 18:04:38 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from allegro.lemis.com (allegro.lemis.com [192.109.197.134]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id SAA18872 for ; Sun, 6 Sep 1998 18:04:34 -0700 (PDT) (envelope-from grog@freebie.lemis.com) Received: from freebie.lemis.com (freebie.lemis.com [192.109.197.137]) by allegro.lemis.com (8.9.1/8.9.0) with ESMTP id KAA18993; Mon, 7 Sep 1998 10:34:30 +0930 (CST) Received: (from grog@localhost) by freebie.lemis.com (8.9.1/8.9.0) id KAA00530; Mon, 7 Sep 1998 10:34:18 +0930 (CST) Message-ID: <19980907103417.D477@freebie.lemis.com> Date: Mon, 7 Sep 1998 10:34:17 +0930 From: Greg Lehey To: A M Bein , support@cdrom.com Cc: questions@FreeBSD.ORG Subject: Re: for: command not found References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.91.1i In-Reply-To: ; from A M Bein on Sat, Sep 05, 1998 at 10:15:29PM -0700 WWW-Home-Page: http://www.lemis.com/~grog Organization: LEMIS, PO Box 460, Echunga SA 5153, Australia Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-41-739-7062 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Saturday, 5 September 1998 at 22:15:29 -0700, A M Bein wrote: > Dear tech supporters, > > I bought Walnut Creeks release of FreeBSD 2.2.7 last week and > installed it. Installation went smoothly until (using THE COMPLETE FREEBSD > by Greg Lehey) I attempted to get source archive (p.96, Chapter 7, > "The Ports Collection") to install some software from the CDs. I stumbled > into a problem. > > I followed the steps outlined in the book: > > 1. mount the cdrom... > 2. cd /cdrom/ports/distfiles > 3. mkdir -p /usr/ports/distfiles > 4. for i in *; do [enter] > > In responce I get the messages: > > for: Command not found > do: Command not found > > Where can I find and install these commands on my system? > > Thanks for reading this, if I don't solve this problem I won't be able to > run any applications (make/make install don't work, and I don't have PPP > connection yet). Well, Ben Smithhurst gave you the correct answer, but you didn't read the very first text in the book: + Important notice + + A list of errata and addenda is available for this book on the first CD- + ROM in the file /book/errata. The most up-to-date list is on + ftp://ftp.lemis.com/pub/cfbsd/errata-2. Please check these lists before + reporting problems. + + If you find errors in this book, please report them to Greg Lehey + for inclusion in the errata list. In this particular case, you'd find: + Page 96 + _______ + + Replace the example at the top of the page with: + + Instead, do: + + # cd /cd4/ports/distfiles + # mkdir -p /usr/ports/distfiles make sure you have a distfiles directory + # for i in *; do + > ln -s /cd4/ports/distfiles/$i /usr/ports/distfiles/$i + > done + + If you're using csh or tcsh, enter: + + # cd /cd4/ports/distfiles + # mkdir -p /usr/ports/distfiles make sure you have a distfiles directory + # foreach i (*) + ? ln -s /cd4/ports/distfiles/$i /usr/ports/distfiles/$i + ? end + + Thanks to Christopher Raven and Francois Jacques for drawing this to my attention. Note that I recommend to use bash, and not csh. This isn't the standard, but there are good reasons for it: you need to understand Bourne Shell syntax, even if you use csh. Why use two different shells? Greg -- See complete headers for address, home page and phone numbers finger grog@lemis.com for PGP public key To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message