在 POSIX sh 中检查字符串包含子串

参考

  • Stack Overflow

总结

(echo $full | grep -q $sub) && echo true || echo false

grep -q 表示 quiet

你可能感兴趣的:(在 POSIX sh 中检查字符串包含子串)