[PATCH v6] Rewrite iconv option parsing [BZ #19519]
Arjun Shankar
arjun.is@lostca.se
Tue Jul 7 18:43:17 GMT 2020
On Tue, Jul 07, 2020 at 05:33:37PM +0200, Andreas Schwab wrote:
> On Jul 07 2020, Arjun Shankar wrote:
>
> > +for hangcommand in "${hangarray[@]}"; do
> > + twobyte="$(echo "$hangcommand" | cut -d";" -f 1)"
> > + c="$(echo "$hangcommand" | cut -d";" -f 2)"
> > + from="$(echo "$hangcommand" | cut -d";" -f 3)"
> > + to="$(echo "$hangcommand" | cut -d";" -f 4)"
>
> That could be replaced by doing an IFS split with IFS=';'.
>
> IFS=';' args=($hangcommand)
>
> and then referring to ${args[0]} etc. (or similar).
Thanks, Andreas. I'll do a follow-up with this and possibly other
improvements to the test, and include you in CC when I post it.
More information about the Libc-alpha
mailing list