bug-sed
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#29351: Sed missing eval command


From: Assaf Gordon
Subject: bug#29351: Sed missing eval command
Date: Sat, 18 Nov 2017 12:57:23 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0

Hello,

On 2017-11-18 10:21 AM, Aeron.E. Wang wrote:
I use sed a lot. To make it more powerful, please add eval command.

With e and s///e, we can somehow eval shell command, isn’t nicer and easier
to eval sed syntax itself?

It would be easier to think of the "e" command as "execute" not "eval" -
it executes the command given (using the shell), and then reads the
output of the command and inserts it into the pattern space.

sed itself does not evaluate the command (or parses, or checks for valid syntax). It passes the command as-is to the shell.

I would consider this as a great meta programming feature adding to sed.

This is certainly not a trivial feature, can you elaborate
and provide some concrete use cases where such feature would be useful?

regards,
 - assaf





reply via email to

[Prev in Thread] Current Thread [Next in Thread]