Tag Info

New answers tagged


[!520]# mysql --version|awk '{ print $5 }'|awk -F\, '{ print $1 }' Output is : 5.5.41


For the above two examples, if you want the "14.14" string: mysql -V | awk '{print $3}' If want the "5.x.x" string: mysql -V | awk '{print $5}' I can't guarantee that the strings will be in the same format across major versions, though. Also, this could probably also be performed with sed and some clever regexing. If you want a check against installed ...

Top 50 recent answers are included