##实例
#!/bin/bashtimestamp=`date "+%Y%m%d%H%M%S"`baseDir=$(cd "$(dirname "$0")";pwd)sed "s/version/$timestamp/g" ${baseDir}/demo.yaml > ${baseDir}/tmp.yml
在sed中使用变量,用双引号 shell脚本中执行函数,用``引用起来
本文共 234 字,大约阅读时间需要 1 分钟。
##实例
#!/bin/bashtimestamp=`date "+%Y%m%d%H%M%S"`baseDir=$(cd "$(dirname "$0")";pwd)sed "s/version/$timestamp/g" ${baseDir}/demo.yaml > ${baseDir}/tmp.yml
在sed中使用变量,用双引号 shell脚本中执行函数,用``引用起来
转载于:https://my.oschina.net/go4it/blog/861706