Link to home
Start Free TrialLog in
Avatar of sduser1
sduser1Flag for United States of America

asked on

Parsing the string in bash script

VERSION="Google Chrome 76.0.3809.100" . (Need to split and get only the version (76.0.3809.100)
#echo $VERSION

IFS=' ' read -a VERSION <<< "$VERSION"
    if "${VERSION[@]}"= "76.0.3809.100"
then
        echo "${VERSION[@]}"
fi

It is not working. Please help.
ASKER CERTIFIED SOLUTION
Avatar of DonConsolio
DonConsolio
Flag of Austria image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
EXPERT CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sduser1

ASKER

Thanks to 3 of you. All of them worked.
You're welcome!