我想读取filein.txt(制表符分隔)并输出一个fileout.txt,其中仅包含与给定列的值匹配的行,并消除正在查询的列。IE,
filein.txt
#name\thouse\taddress
roger\tvictorian\t223 dolan st.
maggie\tfrench\t12 alameda ave.
kingston\tvictorian\t224 house st.
robert\tamerican\t22 dolan st.
假设我只想选择房屋victorian
风格的行,那么我的fileout.txt应该如下所示:
fileout.txt
#name\taddress
roger\t223 dolan st.
kingston\t224 house st.