Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
hi all
i have used a script to split a rows into columns like below:
file a100|22,43,56
101|24,43into
file b100,22
100,43
100,56
101,24
101,43the above is an example...... like this we have some 10000 records in a file..
what the error im getting is that..
im getting some unknown records after splitting.. means some extra records..
like
100,22
100,43
100,56
101,24
101,43
101,67
101,88 where 67 and 88 are not a part of file a....can any body plz help me regarding this...??
i have used below script to split a file:#!/bin/kshi=2while IFS="|" read col1 col2do # parse column 2 by commas set - $(IFS=","; echo ${col2}) i=1 while (($i <= $#)) do printf "%d,%s\n" $col1 $(eval echo \"\$${i}\") ((i+=1)) donedone < datafile
thanks

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |