1
I have a data.txt file, the data format is something like this:
a|Êó•
a|Êõ∞
a|Ôõ∏
a|Ôùã
aa|Êòå
aa|Êòç
aaa|Êô∂
aamh|Êöò
all I would like to do is convert the following text into this result:
'a' => ['Êó•','Êõ∞','Ôõ∏','Ôùã'],
'aa' => ['Êòå','Êòç'],
'aaa' => ['Êô∂'],
'aamh' => ['Êöò']
any ideas on that? Thank you.
vim is not the right tool for this. You need to use awk, or a shell scrip, (or perl, ruby..) (assuming linux) – Nifle – 2011-07-09T09:07:36.813