awk convert from line to column

i have an output like this :
012008
25760883
022008
12273095
032007
10103
032008
10115642
042007
20952798

but i would like to have it like this
012008,25760883
022008,12273095
032007,10103
032008,10115642
042007,20952798

any help will be apreciated

Seems like homework question.

#  paste -d"," - - < file
012008,25760883
022008,12273095
032007,10103
032008,10115642
042007,20952798

This can do the job:

awk '{a=$0;getline;printf "%s,%s\n",a,$0}' file

Thanks a lot Danmero .

Mr ynilesh if you have something for it is ok if not keep you mouth shut you'll do a favor to all people.

:slight_smile: