shell变量设置与显示
摘要:
[root@localhost ~]# echo ${MAIL}/var/spool/mail/root[root@localhost ~]# echo ${MAIL##/*/} #贪婪前匹配删除root[root@localhost ~]# echo ${MAIL#/*/} #前匹配删除spool/mail/root[root@localhost ~]# echo ${MAIL%/*} #后匹配删除/var/spool/mail[root@localhost ~]# echo ${MAIL%%/*} #贪婪后匹配删除[root@localhost ~]# echo ${MAIL//oo/aa 阅读全文
posted @ 2012-12-13 10:08 Goodspeed 阅读(1454) 评论(0) 推荐(0) 编辑