0

I want to print 2 columns in reverse order.

What I want:

LONGER-NAME-PRINTING,0x8da763b9
NAME-1,0x8da6cec9
LONGER-NAME-PRINTING2,0x8da3e489

What I am getting:

awk 'BEGIN { FS="," } { print $2 ,$1}' eol456.txt 

0x8da763b9E-PRINTING
0x8da6cec9
0x8da3e489E-PRINTING2

Separately they look fine:

awk 'BEGIN { FS="," } { print $1}' eol456.txt

0x8da763b9
0x8da6cec9
0x8da3e489
awk 'BEGIN { FS="," } { print $2}' eol456.txt 

LONGER-NAME-PRINTING
NAME-1
LONGER-NAME-PRINTING2

I am really confused why it is not working as I would expect it to. Any help would be greatly appreciated. Thanks.

Musik847
  • 21
  • 5

0 Answers0