Re: ed(1) exit without saving if output file is a command

2016-08-15 Thread Theo Buehler
On Mon, Aug 15, 2016 at 06:26:44PM +0200, Theo Buehler wrote: > On Mon, Aug 15, 2016 at 03:33:38PM +0200, Jérôme FRGACIC wrote: > > Hello tech, > > > > I recently use ed(1) to transmit some input lines to another command. > > However, I remark that after the 'w' command, I can exit ed without any

Re: ed(1) exit without saving if output file is a command

2016-08-15 Thread Theo Buehler
On Mon, Aug 15, 2016 at 03:33:38PM +0200, Jérôme FRGACIC wrote: > Hello tech, > > I recently use ed(1) to transmit some input lines to another command. > However, I remark that after the 'w' command, I can exit ed without any > warnings even if the data were not saved into a file. > > Here is an

ed(1) exit without saving if output file is a command

2016-08-15 Thread Jérôme FRGACIC
Hello tech, I recently use ed(1) to transmit some input lines to another command. However, I remark that after the 'w' command, I can exit ed without any warnings even if the data were not saved into a file. Here is an example : $ ed P *a A simple line. . *w !sed 's/^/#/' #A simple line. 15 *q