netgear ma311 failures (wi0 driver)

Michael W. Oliver michael at gargantuan.com
Tue Apr 22 05:19:10 PDT 2003


> ext Cliff L. Biffle (cbiffle at 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 at 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       |
+----------------------------------------------------------------------+



More information about the freebsd-mobile mailing list