[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 条评论

发表回复

Avatar placeholder

您的电子邮箱地址不会被公开。 必填项已用*标注