#yyds干货盘点#shell进阶之shift与select相关技术

志不强者智不达,言不信者行不果。这篇文章主要讲述#yyds干货盘点#shell进阶之shift与select相关技术相关的知识,希望能为你提供帮助。
1.循环控制命令  shift shift [n] 用于将参量列表  list 左移指定次数,缺省为左移一次。参量列表  list 一旦被移动,最左端的那个参数就从列表中删除。while 循环遍历位置参量列表时,常用到  shift

[root@c7-147 ~]#help shift
shift: shift [n]
Shift positional parameters.
Rename the positional parameters $N+1,$N+2 ... to $1,$2 ...If N is
not given, it is assumed to be 1.
Exit Status:
Returns success unless N is negative or greater than $#.

shift 创建用户账号
[root@c7-147 ~]#help test
test: test [expr]
-z STRINGTrue if string is empty.
-n STRING
STRINGTrue if string is not empty.

#创建用户



【#yyds干货盘点#shell进阶之shift与select相关技术】



    推荐阅读