测试脚本:
#!/bin/sh flag= func() { flag=
echo
} main() { func | grep
echo "flag=$flag"
}
输出显示的flag=0!
参考:https://www.cnblogs.com/super119/archive/2010/12/18/1909829.html
2023-08-16 18:38:58
测试脚本:
#!/bin/sh flag= func() { flag=
echo
} main() { func | grep
echo "flag=$flag"
}
输出显示的flag=0!
参考:https://www.cnblogs.com/super119/archive/2010/12/18/1909829.html