标签:
1.BASH(bourne again shell )
cmd1 ;cmd2等同于 cmd1 cmd2
2.echo music; 中的分号不被打印出,因为分号默认为命令定界符号
3.利用pgrep找出进程的环境变量
[carlton@oc3408554812 shell]$ pgrep compiz 4924 [carlton@oc3408554812 shell]$ cat /proc/4924/environ ORBIT_SOCKETDIR=/tmp/orbit-carltonHOSTNAME=oc3408554812.ibm.comIMSETTINGS_INTEGR #省略很多
4.打印出彩色字体
#! /bin/bash echo -e "\e[1;31m This is red test \e[0m"
5.环境变量浅析
#!/bin/bash fruit=apple count=6 echo "we have $count ${fruit}(HAHA)" 运行结果: we have 6 apple(HAHA)
6.增加环境变量
PATH="$PATH:/home/usr/bin" export PATH echo $PATH #会显示上面定义的变量
标签:
原文地址:http://www.cnblogs.com/carltonx/p/5773609.html