I have a file with the following contents
abc_cde_app_13.5.0.10
abc_cde_app_13.5.0.10.xml
abc_cde_app_13.5.0.10_log.url
abc_cde_app_13.5.0.10_note.xml
The numbers may change and are not standard. And I wish to pick only the 1st one. I am passing all three in to the variable $file. But its showing Version found for all three files. How can I get it only for the 1st
if echo "$file" | grep -E "abc_cde_APP"; then
echo "Version found: $file"
else
echo "File not found"