in reply to splitting output to separate files, one per line
psed -n '=' inputfile | psed 's/.*/&w &.line/' | psed -nf - inputfile [download]
Update: this solution is probably good for only a few lines.