shell bash 模版填充ENV

2017/12/28 shell bash

quick start

#!/bin/bash
ZK_IP="192.168.1.1"
cat ${template_path} |
awk '$0 !~ /^\s*#.*$/' |
sed 's/[ "]/\\&/g' |
while read -r line;do
    eval echo ${line}
done >${dst_path}

转载请注明出处,本文采用 CC4.0 协议授权

Affiliate

Search

    Post Directory