📜  bash 子字符串测试 - Shell-Bash 代码示例

📅  最后修改于: 2022-03-11 14:49:33.956000             🧑  作者: Mango

代码示例5
#!/bin/bash

STR='GNU/Linux is an operating system'
SUB='Linux'

case $STR in

  *"$SUB"*)
    echo -n "It's there."
    ;;
esac