"for" loop with awk
Hi, I am new to linux and awk, and am trying to run a script that will execute an awk command that deletes the first column of a file for every file in a directory.
I think it should look like this:
for i in *; do awk '{$1=""}1' $i > $i_done.txt; done
When I run this it finished, but I don't get any new output files, only one file called ".txt" which appears to have all the results in it.
But when take the command out of the for loop and just run it on one file, it works exactly as it should.
I am using Cygwin on a windows box.
Any help appreciated.
Thanks,
Mike
|