Chris F.A. Johnson wrote:
> Chet, how about an option to mapfile that strips leading and/or
> trailing spaces?
>
> Another useful option would be to remove newlines.
I'm disinclined to add one, since it's easy enough to use the
${line##[ ]} and ${line%%[ ]} constructs to remove
leading and trailing whitespace. You can use the same expansions
or pattern substitution to remove newlines (using $'\n' to denote
a newline).
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
Chet Ramey, ITS, CWRU [email protected] http://cnswww.cns.cwru.edu/~chet/