Anyone can tell me what will be the problem?i know that this is a half sec problem but pls help:) egrep "first" a.sh && egrep "second" a.sh works, a.sh contains first,second,third etc.. Thx!
if [[ egrep "first" a.sh && egrep "second" a.sh ]]; then
echo "success"
fi
I think this may be what you are looking to do: