我想改变这样的文字:使用awk来一列选择性地改变语序
Fred Flintstone:father:male
Wilma Flintstone:mother:female
Flintstone, Pebbles:daughter:female
Barney Rubble:father:male
Rubble, Betty:mother:female
Bam Bam Rubble:son:male
到:
Flintstone, Fred:father:male
Flintstone, Wilma:mother:female
Flintstone, Pebbles:daughter:female
Rubble, Barney:father:male
Rubble, Betty:mother:female
Rubble, Bam Bam:son:male
是否有可能做到这一点在awk中的一行?或者更好地提取第一列操纵文本并重新导入列?
是的,它绝对有可能在一行awk :)你有没有尝试过任何东西? –