Moving items to a new line

Hi,

Let's I have the following strings (md5):

07177edf8261d28c6a003e583fcbe38c
0717c0037b3a20fc0f0998e673f228d5
0717d611a5d24374628b98e17fd00977,0717d611a5d24374628b98e17fd00977
07189a18afdae558bb5aadfe602e4a91
0719e97d481c239667f38a3e166bed74
071af3225fe50a1fdbb42c43aac313cc
071af3225fe50a1fdbb42c43aac313cc,071d5e253d25beab5fbf52306276e2db
0722012fee3e4a3220be750af9e03530
07234cc372614c2c24dc39a74d768876
072894ab3ada5f2ba13ffde6b642d222,072894ab3ada5f2ba13ffde6b642d222
072e2a308498065cbae22a752f92ecd0
072ef15fd47cf13ad537bec5c75eae62
072fc415848c2f31aad6702ca87fa852
07317233fae64c20d63f916442e43dad,07317233fae64c20d63f916442e43dad
0734c1b80b849285b1eaf2518469b740
073628c14abe56e025e973b8e1aef76e
07378b575b318638a4830711774ed820
07378b575b318638a4830711774ed820,07379d25fee06519ac3820fbb745ce27
0738030a25a32ec7808abd225a8a4e08
073ae0ecb922c7948c8ab8c3966a6554

I want to move them item with comma to a new line, say the next line. How can I do this. Currently I'm manually using

awk -F, {'print $1.....$n'}

but that is very tedious since I also have column up to 8,9... and almost 16.

Thanks.

Post desired output for that sample please.

1 Like
perl -0777 -pe 's/,/\n/g' 

Or just

...  | tr ',' '\n'

sed 's/,/\n/g' file.txt

single columned :slight_smile:

0111844aed823108b007977cec035f37
0111844aed823108b007977cec035f37
0111a3de00c679ed6c0fbb8c6159cf83
01158d3c0c9da3e01e556a4b057e0940
0115ae0d3c679e3d259e55f531989543
01166d4f832ae67f480e95312e4e06e0
01166d4f832ae67f480e95312e4e06e0
01196852e42dd8f748a7da8eb8fa9b6e
011bbba2e3be13ea2aa84a1242e0d47b
012030d215e5207dd15ff3045d299210
012030d215e5207dd15ff3045d299210
01211232204f7a25b697c1159ce19a86
0121535cb52a1a90d0bbdda4efd65a86
0121535cb52a1a90d0bbdda4efd65a86
0122b82a91fda0699269aa346d93e9be

---------- Post updated at 07:21 PM ---------- Previous update was at 07:04 PM ----------

thanks, exactly i want :slight_smile: