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
An alternative is to use sponge:
sponge
awk '{print $0}' your_file | sponge your_file
Where you replace '{print $0}' by your awk script and your_file by the name of the file you want to edit in place.
'{print $0}'
your_file
sponge absorbs entirely the input before saving it to the file.