We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bef4a4b commit 2a44f26Copy full SHA for 2a44f26
shell.md
@@ -251,7 +251,7 @@ sh里没有多行注释,只能每一行加一个#号。就像这样:
251
#### 查找子字符串
252
253
string="alibaba is a great company"
254
- echo `expr index "$string" is`#输出:8,这个语句的意思是:找出单词is在这名话中的位置
+ echo `expr index "$string" is`#输出:3,这个语句的意思是:找出字母i在这名话中的位置,要在linux下运行,mac下会报错
255
256
#### 更多
257
参见本文档末尾的参考资料中[Advanced Bash-Scripting Guid Chapter 10.1](http://tldp.org/LDP/abs/html/string-manipulation.html)
0 commit comments