Date: Tue, 22 Apr 2003 08:19:08 -0400 From: "Michael W. Oliver" <michael@gargantuan.com> To: "Mike Jackson" <mjj@isorauta.ntc.nokia.com>, "ext Cliff L. Biffle" <cbiffle@safety.net> Cc: mobile@freebsd.org Subject: Re: netgear ma311 failures (wi0 driver) Message-ID: <003401c308c9$5fe50880$0203000a@gargantuan.com> References: <20030417205051.GA1232@isorauta.ntc.nokia.com><20030421095256.M2827@znfgre.tberna.bet><016a01c30850$2680ffa0$15b55042@vizion2000.net><200304211607.27258.cbiffle@safety.net> <20030422051138.GA28469@isorauta.ntc.nokia.com>
next in thread | previous in thread | raw e-mail | index | archive | help
> ext Cliff L. Biffle (cbiffle@safety.net) wrote: > > > > On a related note, can a bourne shell guru drop me a line and tell me how to > > for-loop over -lines- in a file instead of -words- in a file? I've tried > > changing the delimiter characters with no luck. :-) > > Hi, > Make a text file one word per line called TEXT. > > > > > #!/bin/sh > > for x in `cat TEXT` > do > echo -e "$x\n" > done > > > -- I think that is the problem that he is having. He already has multiple words per line, and needs to read them from the file as _lines_ and not _words_. Try this.... <a file called 'list' has the lines of text that you want to read> #!/bin/sh cat list | while read line do echo $line done That should take care of it. -- +---------------------------------------+------------------------------+ | Michael W. Oliver, CCNP | "The tree of liberty must be | | IPv6 & FreeBSD mark | refreshed from time to time | | michael@gargantuan.com | with the blood of patriots | | http://michael.gargantuan.com/ | and tyrants." | | ASpath-tree, Looking Glass, etc. | - President Thomas Jefferson | | +------------------------------+ | gpg key - http://michael.gargantuan.com/gnupg/pubkey.asc | +----------------------------------------------------------------------+
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?003401c308c9$5fe50880$0203000a>