2012年7月10日

shell中一些常用组合命令

摘要: ${var:-”default var”} 如,sed ${1:-25} 意思:显示参数$1表示的行数(默认为25)${var:=”default var”}${var:?”message”}${#var}${var#matcher}${var##matcher}${var%matcher}${var%%matcher}ls my_{finger,toe}soutput: my_fingers my_toes[]: test 命令的一个软链接$# :引用的变量总数(参数个数)$- :shell使用的当前选项$*:显示所有参数$!:最后一个后台运行的进程ID号$$ :当前shell脚本的进程.. 阅读全文

posted @ 2012-07-10 11:10 lianshisxq 阅读(321) 评论(0) 推荐(0) 编辑

导航