Quantcast
Channel: UNIX and Linux Forums
Viewing all articles
Browse latest Browse all 16232

awk - OFS printing duplicate. Why?

$
0
0
Why the following code printing duplicate records?

bash-4.1$ cat rm1
Code:

        c1      c2      c3
l1      2      3      4
l2      2      3      2

bash-4.1$ awk '{print $0} OFS = "\n"' rm1
Code:

        c1      c2      c3
        c1      c2      c3
l1      2      3      4
l1      2      3      4
l2      2      3      2
l2      2      3      2


Viewing all articles
Browse latest Browse all 16232

Trending Articles