您的位置:首页 > 运维架构 > Shell

shell基础

2014-03-14 14:01 218 查看
1.数组定义

  a = (1 2 3)

 注意: '='等号左右不能有空格,否则报错.

2. cat --help 

  -A, --show-all           equivalent to -vET

  

  -E, --show-ends          display $ at end of each line
  -T, --show-tabs          display TAB characters as ^I

  -n, --number             number all output lines

  -b, --number-nonblank    number nonempty output lines

3.shell多行变量赋值

a=`cat <<EOF

123

345

EOF

`

echo "$a"  --> 带换行输出

4.

  

 
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: