sort和uniq命令
2015年2月8日
没有评论
sort命令主要是给给定的文档排序
测试文件:
Thomas:100:Marketing Alex Jason:200:Sales Blex Jason:200:Sales Madison Randy:300:Product Development Sanjay[......]
sort命令主要是给给定的文档排序
测试文件:
Thomas:100:Marketing Alex Jason:200:Sales Blex Jason:200:Sales Madison Randy:300:Product Development Sanjay[......]
1.数组的定义
1.1.定义同时赋多个值
[test@Server1 shell]$ names=(tom jack lili)
注意:数组的元素以空格作为分隔符。下标从0开始
1.2按索引赋值
[root@Server1 jdk1.6.[......]
1.${#var}
查看变量的长度
[test@Server1 shell]$ unset name [test@Server1 shell]$ name=tom [test@Server1 shell]$ echo ${name} tom
如果变量为设[......]