1.命令替换
#!/bin/bash #命令输出负载给变量的两种方式#反引号字符(`)#$()格式 d1=`date` d2=$(date) echo "The date d1 and time are: $d1" echo "The date d2 and time are: $d2"
原文地址:https://www.cnblogs.com/zy09/p/10595554.html
时间: 2024-10-10 23:52:04
1.命令替换
#!/bin/bash #命令输出负载给变量的两种方式#反引号字符(`)#$()格式 d1=`date` d2=$(date) echo "The date d1 and time are: $d1" echo "The date d2 and time are: $d2"
原文地址:https://www.cnblogs.com/zy09/p/10595554.html