I would like to write a small script using the standard linux shell scripting tools (sed, awk, etc.) to create one output file per line of input. For example, given the following input file 'input':
line1
line2
line3
I would like to run the command.
$ cat input | my_prog
Where 'my_prog' is a script that creates three output files, out.1, out.2, out.3
$ cat out.1
line1
$ cat out.2
line2
$ cat out.3
line3