- 论坛徽章:
- 0
|
本帖最后由 louis0o0 于 2014-09-03 22:36 编辑
最近学习awk处理,在做例题时碰到如下问题:
交换first name与second name,原始为:
Tommy Savage:408-724-0140:1222 Oxbow Court, Sunnyvale, CA 94087:5/19/66:34200
Yukio Takeshida:387-827-1095:13 Uno Lane, Ashville, NC 23556:7/1/29:57000
Vinh Tranh:438-910-7449:8235 Maple Street, Wilmington, VM 29085:9/23/63:68900
要求改变之后为:
Savage Tommy:408-724-0140:1222 Oxbow Court, Sunnyvale, CA 94087:5/19/66:34200
Takeshida Yukio:387-827-1095:13 Uno Lane, Ashville, NC 23556:7/1/29:57000
Tranh Vinh:438-910-7449:8235 Maple Street, Wilmington, VM 29085:9/23/63:68900
我不知道如何处理的地方在于如何只变换两列名字,同时保持后面的所有字符不变。还求大神帮助!~~先谢了~ |
|