sed -i.old "s/buildDate: [0-9]\+-[0-9]\+-[0-9]\+_[0-9]\+:[0-9]\+:[0-9]\+/buildDate: $(date +%Y-%m-%d_%H:%M:%S)/" config.yml echo buildDate: $(date +%Y-%m-%d_%H:%M:%S) hugo