79744140

Date: 2025-08-23 09:45:19
Score: 1
Natty:
Report link
#!/bin/sh
if [ "$var1" != "${var1%mtu *}" ]; then
    echo "Matches, do something"
fi

If the pattern doesn't match its value will be equal to the variable. If there's a match (even with % or #) it will return something else... and we're good to go :)

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: ATAG