Nth word in a string variable

前端 未结 6 1508
夕颜
夕颜 2020-12-13 08:05

In Bash, I want to get the Nth word of a string hold by a variable.

For instance:

STRING=\"one two three four\"
N=3

Result:

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