I am learning awk and I would like to know if there is an option to write changes to file, similar to sed where I would use -i option
awk
sed
-i
following won't work
echo $(awk '{awk code}' file) > file
this should work
echo "$(awk '{awk code}' file)" > file