Shell有类型变量

declare和typeset命令
◆ declare命令 和typeset命令两者等价
◆ declare、 typeset命令 都是用来定义变量类型的

declare

参数 含义
-r 将变量设为只读
-i 将变量设为整数
-a 将变量定义为数组
-f 显示此脚本前定义过的所有函数及内容
-F 仅显示此脚本前定义过的函数名
-x 将变量声明为环境变量

Comments

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×