AWK to print field $2 first, then field $1

后端 未结 4 1035
时光取名叫无心
时光取名叫无心 2020-12-12 20:33

Here is the input(sample):

name1@gmail.com|com.emailclient.account
name2@msn.com|com.socialsite.auth.account

I\'m trying to achieve this:

4条回答
  •  爱一瞬间的悲伤
    2020-12-12 21:17

    The awk is ok. I'm guessing the file is from a windows system and has a CR (^m ascii 0x0d) on the end of the line.

    This will cause the cursor to go to the start of the line after $2.

    Use dos2unix or vi with :se ff=unix to get rid of the CRs.

提交回复
热议问题