HI guys i have a file
Now, I need the 4th column copied over 10 more times, so I would have 14 columns in total.
I tried this
Am getting the o/p reversely
Columns are added at the beginning instead of the end.. I want add from the 5th column..
Help me Please..
Code:
cat file1
00510010 0000000471 482.90 5855.49
00510015 0000000471 2280.81 3093.79
00510020 0000000471 23640.82 22857.28
00510021 0000000471 3455.12 0
I tried this
Code:
awk '{for (i=1; i<=10; i++) {printf "%s %s",$NF,$i}} 1' file1 OFS=','
Code:
5855.49 5855.49 5855.49 5855.49 5855.49 5855.49 00510010 0000000471 482.90 5855.49
3093.79 3093.79 3093.79 3093.79 3093.79 3093.79 00510015 0000000471 2280.81 3093.79
22857.28 22857.28 22857.28 22857.28 22857.28 22857.28 00510020 0000000471 23640.82 22857.28
0 0 0 0 0 0 00510021 0000000471 3455.12 0
Help me Please..