Hello,
I was wondering if you can help me, I am tryin gto achieve a specif output and I am stuck, any help would be greatly appreciated.
# cat file
1,2,3,4,5,6
1,,3,4,5,6
1,2,,,,6
# cat file | awk -F, '{print $1,$2,$3,$4,$5,$6}' | awk '{printf("%-1s %2s %2s %2s %2s %2s\n", $1, $2, $3, $4, $5, $6)}'
1 2 3 4 5 6
1 3 4 5 6
1 2 6
# cat file | awk -F, '{printf("%-1s %2s %2s %2s %2s %2s\n", $1, $2, $3, $4, $5, $6)}'
1 2 3 4 5 6
1 3 4 5 6
1 2 6
NEED TO SEE:
This is what I need: If no value = "0" and then # awk -F, '{printf("%-1s %2s %2s %2s %2s %2s\n", $1, $2, $3, $4, $5, $6)}'
1 2 3 4 5 6
1 0 3 4 5 6
1 2 0 0 0 6