I need a sentence if...else.. that verify if the filename curbing a string specifies in bash
for j in `ls `
do
if [ "${j:(-3)}" == ".gz" ]; then
Cmd="zcat"
elif [ "${j:(-4)}" == ".bz2" ]; then
Cmd="bzcat"
else
Cmd="cat"
fi
if [ $j ***contains*** "string1"]; then
$cmd $j | awk -F"," '{print $4}'
elif [ $j *contains* "string2" ]; then
$cmd $j | awk -F"," '{print $2}'
fi
done