In a Windows Server environment, having trouble with escaping quotes that are within quotes. Using the functioning batch code below as a base:
awk -F "|" "$4 ~ /JUVENILE/ {sum +=$6} END {printf sum}" sourcedata.file
Problems occur when trying to include "%.3f" to printf. I am confused and unable to properly escape these quotes in my environment.
awk -F "|" "$4 ~ /JUVENILE/ {sum +=$6} END {printf """%.3f""", sum}" sourcedata.file
The above will work at the command prompt, but will not work in a simple batch file. I have also attempted to replace "%.3f" with \"%.3f\" and \""%.3f\"" and these also do not work in a batch file.