transpose every n lines into a single line
You can do this way too (a bit long though):
#!/bin/bashc=0while read -r idoif [[ $i == "" ]]; thenline="$line""\n"c=2elif [[ $c == "2" || $c == "0" ]]; thenline="$line""$i"c=1elseline="$line"" ""$i"fidone <file1echo -e "$line"
Ouptput:
hi hello how are you i am fine how are youhi how is she doing i have not herd from her