说我想匹配
sh
/sh
[/^]sh$
^sh
^
\
PS:我在 ADB shell 中使用 grep,此处的 grep 可能与标准 *nix 系统中的略有不同。
你应该为此使用
grep -E '^/?sh'
/