I have a list of commands to parse through for an audit, similar to this:
1. -a *policy name=PolicyName -a *policy workflow name=PolicyWorkflow -a *policy action name=PolicyAction -s Server -b Storage -J Node -y 1 Months -o -F -S
2. -a *policy name=PolicyName -a *policy workflow name=PolicyWorkflow -a *policy action name=PolicyAction -s Server -b Storage -J Node -y 1 Months -o -F -S
3. -a *policy name=Policy Name -a *policy workflow name=PolicyWorkflow -a *policy action name=PolicyAction -s Server -b Storage -J Node -y 1 Months -o -F -S
I'm trying to set each of the name=Value to variables. As this is a standard pattern, i used read with success, however when I get to a line with whitespace (see line 3), it offsets all my variables. I'm unsure how to tackle this without looping through each word in the line and matching specific patterns. Hoping someone would have a better solution out there.