Using sed to replace number greater than a specified number in an specified position using shell scripting
问题 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 146983209 Here I am writing a script if the second term exceeds in value greater than 300000000. I need the whole line to be replaced by my desired value like 1499011200 250000000 XXXX XXXX XXXX I hope I have made my question clear. Thanks in advance 回答1: This might work for you (GNU sed): sed -r '/^\S+\s+(300000000|[1-2][0-9]{8}|[0-9]{1