-1
我的代碼段中,如下回聲線:
echo "$(wc -l prov_bulk) provisioning commands found between $t_stmp1 of $(head -1 file_list) till $t_stmp2 of $(tail -1 file_list)"
預期輸出:
1054721 provisioning commands found between 2017033023 of 170330.AUG till 2017033102 of 170331.AUG
輸出得到:
1054721 prov_bulk provisioning commands found between 2017033023 of 170330.AUG till 2017033102 of 170331.AUG
爲什麼文件名「prov_bulk」也出現?如何擺脫這一點?
閱讀'wc'的文檔。 – chepner
文件名是您的命令輸出的一部分。它完美地展開。 –