On Wed, 24 Apr 2002, at 10:09am, Michael O'Donnell wrote:
> Here's what I do to cause bash to say "Segmentation fault"
> 
>    cd /
>    find . -type f | while read f
>    do
>        ls -laFd $f
>    done

  Here are some test cases to try...

  Test 'read' in a loop:

        yes | while read f ; do true ; done

  Test 'read' in a loop where the variable is mentioned but ignored:

        yes | while read f ; do true $f ; done

  Test 'read' in a loop where the variable is used, albeit thrown away (I am
running this one right now):

        yes | while read f ; do echo $f > /dev/null ; done

  Test 'read' in a loop where the variable is used for an external program
(this could hurt a poorly limited system, so use caution):

        yes | while read f ; do /bin/echo $f > /dev/null ; done

-- 
Ben Scott <[EMAIL PROTECTED]>
| The opinions expressed in this message are those of the author and do not |
| necessarily represent the views or policy of any other person, entity or  |
| organization.  All information is provided without warranty of any kind.  |


*****************************************************************
To unsubscribe from this list, send mail to [EMAIL PROTECTED]
with the text 'unsubscribe gnhlug' in the message body.
*****************************************************************

Reply via email to