fork(13) download
  1. file="12312
  2. desc: bleh...
  3. 9938
  4. desc: blah...
  5. desc: bloh...
  6. desc: blih...
  7. desc: bluh...
  8. 9912
  9. desc: blah...
  10. "
  11.  
  12. awk '!/^desc:/&&NR>1{print OFS}{printf "%s ",$0}END{print OFS}' <<< "$file"
Success #stdin #stdout 0.03s 5264KB
stdin
Standard input is empty
stdout
12312 desc: bleh...  
9938 desc: blah... desc: bloh... desc: blih... desc: bluh...  
9912 desc: blah...