Quoting is an issue if you're running awk from the command line. You'll sometimes need to use \
, e.g. to quote "
, but most of the time you'll use ^
:
w:\srv>dir | grep ".txt" | awk "{ printf(\"echo %s@%s ^> %s.tstamp^\n\", $1, $2, $4); }"
echo 2014-09-07@22:21 > requirements-dev.txt.tstamp
echo 2014-11-28@18:14 > syncspec.txt.tstamp