Split file into multiple small files, separate by the newline symbol

splittext processing

Is there a utility that split file by newline symbol? e.g if a file contains the following lines,

aa
bbb
cccc

If I want to split it to 3 files, the desired output would be:

aa, bbb And cccc (in 3 different files)

I already checked the split command, it only cut file by file sizes, not what I want.

If I don't wrote a utility myself, is there any standard tool to use?

Best Answer

Unless I'm missing something, split does split by line if you use -l switch:

   -l, --lines=NUMBER
          put NUMBER lines per output file

so

split -l 1 inputfile

should do what you want.