$ # $() bash 特殊符号

[root@hexingxing /]# name=cc
[root@hexingxing /]# echo $name
cc

// $:输出变量值,调用变量 name 值,用 $name 的方式获得变量的值

[root@hexingxing /]# cat /etc/selinux/config

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
#SELINUX=enforcing
# SELINUXTYPE= can take one of these two values:
#     targeted - Targeted processes are protected,
#     mls - Multi Level Security protection.
#SELINUXTYPE=targeted 
SELINUX=disabled

// #:shell 脚本中,#开头的代表注释

[root@hexingxing /]# echo $(date)
2016 年 09 月 22 日 星期四 20:16:20 CST

// $(date):$() 引用系统命令

0 条评论

昵称

沙发空缺中,还不快抢~