Test if a string contain a substring – unix.stackexchange.com

I have the code file="JetConst_reco_allconst_4j2t.png" if [[ $file == *_gen_* ]]; then echo "True" else echo "False" fi I test if file contains "gen". The output is "False". Nice! The ...

from Hot Questions - Stack Exchange OnStackOverflow
via Blogspot

Share this

0 Comment to "Test if a string contain a substring – unix.stackexchange.com"