Hello Andrew,
Andrew L. Moore wrote:
| Martin Thomsen wrote:
| printf '%s\n' 'r !date +"% modified on \%F"' ',p' Q | ed -s fil1
|
| outputs
|
| date +"fil1 modified on \%F"
| fil1 modified on \2021-07-10
|
| I think the output should contain no backslashes, per POSIX
| documentation. The GNU ed manual would benefit from clarification.
I agree. This is the correct behavior.
This was fixed three versions ago (in 1.18-pre2). Please check it before I
release 1.18 stable in three weeks or so:
$ printf '%s\n' 'r !date +"% modified on \%F"' ',p' Q | ed -s fil1
date +"fil1 modified on %F"
fil1 modified on 2022-01-08
$ ed -V
GNU ed 1.18-rc1
Best regards,
Antonio.