I would like to reproduce here a function by David Korn:

==================cut here============================
function readfile # var file
{
        nameref var=$1
        set -f
        IFS=$'\n\n'
        var=( $(< $2))
}
==================cut here============================

I presume that [set -f] (disable file name generation) is locally scoped, but 
what about the assignment to IFS? It seems to me that IFS is globally scoped 
here, hence that assigment would most likey have bad side effects on the caller 
code.

Questo messaggio e i suoi allegati sono indirizzati esclusivamente alle persone 
indicate. La diffusione, copia o qualsiasi altra azione derivante dalla 
conoscenza di queste informazioni sono rigorosamente vietate. Qualora abbiate 
ricevuto questo documento per errore siete cortesemente pregati di darne 
immediata comunicazione al mittente e di provvedere alla sua distruzione, 
Grazie.

This e-mail and any attachments is confidential and may contain privileged 
information intended for the addressee(s) only. Dissemination, copying, 
printing or use by anybody else is unauthorised. If you are not the intended 
recipient, please delete this message and any attachments and advise the sender 
by return e-mail, Thanks.


_______________________________________________
ast-users mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-users

Reply via email to