学习笔记——shell脚本编辑命令行(命令替换)

命令行替换 (1)反引号字符(`) 示例 test=`date` #!/bin/bash test=`date` echo "The date and time are: " $test (2)$()格式 示例 test=$(date) #!/bin/bash test=$(date) echo "The date and time are: "$test 应用 在脚本中经过命令替换得到当前日期
相关文章
相关标签/搜索