-1

My code snippet has an echo line as below:

echo "$(wc -l prov_bulk) provisioning commands found between $t_stmp1 of $(head -1 file_list) till $t_stmp2 of $(tail -1 file_list)"

Expected output:

1054721 provisioning commands found between 2017033023 of 170330.AUG till 2017033102 of 170331.AUG

Output getting:

1054721 prov_bulk provisioning commands found between 2017033023 of 170330.AUG till 2017033102 of 170331.AUG

Why the file name "prov_bulk" also shows up ? How to get rid of this ?

dig_123
  • 2,240
  • 6
  • 35
  • 59

1 Answers1

1

By simply adding a < should solve your problem. The redirection omits the filename.

echo "$(wc -l < prov_bulk) provisioning commands found between $t_stmp1 of $(head -1 file_list) till $t_stmp2 of $(tail -1 file_list)"