string="hello world"echo expr index "$string" io
expr index "$string" io
执行后 提示expr: syntax error
请问语法哪里有问题,新手小白,各位朋友帮忙看下
string=‘hello world’result = `echo ‘Result = $result’
您可以试一下如下代码:
string="hello world" result = `expr index "$string" io` echo "Result = $result"