2017-04-05 17 views

回答

0

我的建议是用状态字段数据预处理输入文件。一个简单的方法来做到这一点是使用awk设置为tab像下面OFS(输出字段分隔符):

# Assuming the 5th field of the input file is the state field 
awk '{OFS = "\t"; $5 = "WA"; print}' input.txt > inputStateRevised.txt 

如果你没有在现有的输入文件中的状态字段,可以追加状态字段如下:

# Assuming there are a total of 8 fields in the original input file 
awk '{OFS = "\t"; $9 = "WA"; print}' input.txt > inputStateAppended.txt 
相关问题