sh bash解析输入到位置属性

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sh bash解析输入到位置属性相关的知识,希望对你有一定的参考价值。

set $text
#After that, individual words in $text will be in $1, $2, $3, etc. For robustness, one usually does

set -- junk $text
shift
#to handle the case where $text is empty or start with a dash. For example:


text="This is          a              test"
set -- junk $text
shift
for word; do
  echo "[$word]"
done

以上是关于sh bash解析输入到位置属性的主要内容,如果未能解决你的问题,请参考以下文章