Hi All, Thanks for all helpful hints. I used echo to print multiple lines including the two lines, i.e. the lines starting with "Exec=" and "Comment=", in one command. The output is used to recreate the .deskop file as follows:
Code quoted from: netman-gui.postinst: (lines 72 - 83) rm -f "${launcher}" echo \ "[Desktop Entry] Categories=Application;Network; ${line} ${comment} GenericName=Netman Icon=netman.ico Name=Netman Network Manager Terminal=false Type=Application Categories=Network;" > "${launcher}" This worked as required without issues. Edward On 08/01/2016, Rainer Weikusat <rainerweiku...@virginmedia.com> wrote: > aitor_czr <aitor_...@gnuinos.org> writes: >> On 01/07/2016 09:34 PM, Rainer Weikusat >> <rainerweiku...@virginmedia.com> wrote: >>> printf 'g/^Comment=/d\na\n%s\n.\nwq\n' "$comment" | ed netman.desktop >>> [*] >> >> Aitor. >> >> [*] Joseph Conrad. > > ? > > Regardless of that, if you quote text from me, especially code, it would > be a good idea if you didn't modify that (eg, add a [*]) in a way which > is not easily recognizable. > _______________________________________________ > Dng mailing list > Dng@lists.dyne.org > https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng > _______________________________________________ Dng mailing list Dng@lists.dyne.org https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng