What would be the best way to check if a particular line (in variable) has an another line (more than 1 char)?
I understand it could be done with 'grep', 'sad', 'awk', by parameter expansion, but all these seems to me havy, worldy, not elegant and overhead in processing
For so common task I would expect something from shell, maybe, close to:
Code:
>a="string with piece to search"
>${a??"piece"} && echo "the string has a searched substring" || echo "not found"