Pure sed
solution
Desculpe, não estou familiarizado (o suficiente) com awk
, mas isso funciona:
sed '/Jpak=/,/^$/!d' sample|sed ':a;N;$!ba;s/\n//g;s/,/ /g;s/ \{2,\}/ /g;s/Jpak/\n\nJpak/g'
Como eu posso substituir uma nova linha (\ n) usando sed?
Saída
Jpak= its just a sample data for posting solve the query asap
Jpak= To work late into the night alluding to the time before electric lighting
Jpak= Speak of an issue (mostly current) which many people are talking
Usando essa cadeia de comandos, a saída começa com duas linhas vazias (não mostradas aqui), adicione |sed '1,2d'
ao final da cadeia para removê-las.