摘要:
1、普通数组:只能用整数作为索引1.1、赋值[root@client02 ~]# array[0]=test1[root@client02 ~]# array[1]=test2[root@client02 ~]# array[2]=test31.2、打印[root@client02 ~]# echo 阅读全文
摘要:
1、ls -d */[root@client02 ~]# ls -d */Desktop/ Documents/ Downloads/ jq-1.5/ Music/ Pictures/ Public/ Templates/ Videos/ zookeeper/[root@client02 ~]# 2 阅读全文
摘要:
在Bash shell中,可以利用let、(( ))、[]执行基本的算术操作,在高级操作时,使用expr和bc两个工具1、let[root@client02 ~]# no1=4[root@client02 ~]# no2=5[root@client02 ~]# let result=no1+no2[ 阅读全文
摘要:
1、在Bash中,每一个变量的值都是字符串 2、查看某个进程的环境变量 cat /proc/$PID/environ | tr '\0' '\n' 3、变量赋值 3.1、var=value,注意var = value不是赋值操作,而是相等操作 3.2、若value包含任何空白字符,则必须使用单引号或 阅读全文