This command will return true if the string has the suffix or false otherwise.
string hassuffix "ly" "freindly"Would return true
string hassuffix "ing" "freindly"Would return false
NOTE: To read content from standard input we use the -i - option.
echo "freindly" | string -i - hassuffix "ly" Would return true
echo "freindly" | string -i - hassuffix "ing" Would return false