Replace Entire Column with a Number in Bash

Share Tweet

Use below awk one-liner to replace all values in a column (5th column in example) with a value (1 in example).

awk "{$5=1} {print}" filename > filename.replaced
Share Tweet

Questions?

Please start a discussion down below or send me an email!