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 $ # No warning before exit This behaviour seems not conform to the Open Group Base Specifications Issue 6 (IEEE Std 1003.1, 2004 Edition). I would suggest this diff to solve this problem. Index: main.c =================================================================== RCS file: /cvs/src/bin/ed/main.c,v retrieving revision 1.57 diff -r1.57 main.c 862c862 < else if (addr == addr_last) --- > else if (addr == addr_last && *fnp != '!') PS : I haven't subcribe to the tech mailing list, so please add me as recipient if you reply. Kind regards, Jérôme FRGACIC