This is my first day with awk scripting..Please pardon my ignorance, if any..
I am trying to remove all files ending with .dat
ls -1R xyz/ | awk '$1==*.dat{print "rm " $1}' | bash
ls -1R --> will list files/directories one per line, even the sub directories
I try to match first field of line == *.dat , if true.. remove that file,i know I have not taken care of subdirectory... But that is what I am trying..Any idea how to do it..