Position of a string within a string using Linux shell script?

后端 未结 4 1123
逝去的感伤
逝去的感伤 2020-12-05 06:35

If I have the text in a shell variable, say $a:

a=\"The cat sat on the mat\"

How can I search for \"cat\" and return 4 using a

4条回答
提交回复
热议问题