validate file content with bash Regular Expressions + Linux

how to validate the following file content

that should be include single integer/float number
by bash Regular Expression or any other idea with awk/sed

 cat  /var/VERSION/Version_F35_project_usa
 2.8

Answer

Your regexp is /\A\d+.?\d+\Z/g

Attribution
Source : Link , Question Author : jango , Answer Author : Ivan Mastrenko

Leave a Comment