|
From: | Antonio Diaz Diaz |
Subject: | Re: Escaped percent sign in shell escape (bang) command (ed 1.16) |
Date: | Sat, 08 Jan 2022 23:50:28 +0100 |
User-agent: | Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 |
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.
[Prev in Thread] | Current Thread | [Next in Thread] |