I would like to have help with syntax for using a string varaibles inside if and else in a awk one liner.
Eg. I would like to say, list all the filenames that have been modified in a particular month(present in a string variable) or list all the filenames whose owner is $owns and owner group is $group in current directory by using awk one liner...
I tried
with '==' but its either taken literally or gives error.. I am using:
ls -ltr | awk '{if ($6 == "${month_value}"){print $9 }' > filestobeprocessed.txt