I need to write a script to replace all the numbers greater than an specified number which is in following position.
1499011200 310961583 142550756 313415036 14
In awk:
$ awk '$2>300000000{for(i=3;i<=NF;i++)$i="XXXX"}1' file 1499011200 310961583 XXXX XXXX XXXX
Explained:
$ awk ' # using awk $2>300000000 { # if the second value is greater than ... for(i=3;i<=NF;i++) # for each value aftef the second $i="XXXX" # replace it with XXXX }1' file # output