man bash: you will find below
-- If no arguments follow this option, then the positional parameters are unset. Otherwise, the positional parameters are set to
the args, even if some of them begin with a -.
for example:根据IFS重设位置参数
-- If no arguments follow this option, then the positional parameters are unset. Otherwise, the positional parameters are set to
the args, even if some of them begin with a -.
for example:
- june@~ 01:42:16>
- line=sadasd:ddddd; IFS=: ; set -- $line; echo $1; echo $2
- sadasd
- ddddd
- june@~ 01:42:26>

本文介绍了如何在bash脚本中使用IFS(Internal Field Separator)重设位置参数,包括使用IFS进行参数设置和输出特定参数的方法。
3717

被折叠的 条评论
为什么被折叠?



