On Wed, Jun 12, 2013 at 6:53 PM, Linda Walsh <bash@tlinx.org
<mailto:bash@tlinx.org>> wrote:
The trace looks aprolike this:
./ifc#137(handle_bonding_ops)> (( 18>3 ))
./ifc#138(handle_bonding_ops)> [[ mode=balance-rr 0 =~
^([a-zA-Z][-a-zA-Z0-9_]+)=(.+)__[[:space:]]+[a-zA-Z][-a-zA-Z0-__9_]+=.+.*$
]]
./ifc#142(handle_bonding_ops)> [[ mode=balance-rr 0 =~
^([a-zA-Z][-a-zA-Z0-9_]+)=(.+)__$ ]]
./ifc#145(handle_bonding_ops)> break
(#138 is all 1 line)
---- the source code looks like this:
my id='[a-zA-Z][-a-zA-Z0-9_]+'
while ((${#bond_ops}>3)); do
if [[ $bond_ops =~ ^($id)=(.+)[[:space:]]+$id=.+.__*$ ]]; then
...
elif [[ "$bond_ops" =~ ^($id)=(.+)$ ]]; then
...
else break; fi
---
I would think the 2nd match would match it, but no luck...
Note the 2nd source line has double quotes due to testing...
Originally it had no quotes, as I don't believe they are
necessary in this case. Regardless, neither way matches.
So if not obvious, bond_ops has "mode=balance-rr 0" in it.
Thanks...
Just FYI, you should be using [[:alpha:]] and [[:alnum:]], as they're
safe for all locales.