我有这样的文件:
one vijay three
two vijay four
five chandu three
Run Code Online (Sandbox Code Playgroud)
outputfile1
one vijay three
two vijay four
Run Code Online (Sandbox Code Playgroud)
outputfile2
five chandu three
Run Code Online (Sandbox Code Playgroud)
根据第二列的值拆分文件.
我可以在shell脚本中执行此操作.但我认为它在awk中更简单.我怎么用awk做的?