I want to split file according to it's content.
My dummy file looks like that:
info info info cat
info info info cow
info info info dog
info info info dinosaur
info info info bat
$4 words starts with different letters (C,D,B) - I want to split file into multiples according to the first letter of $4.
Preferable output (3 different files) looks like that:
file_c
info info info cat
info info info cow
file_d
info info info dog
info info info dinosaur
file_b
info info info bat
Hope someone can help me with this.