Consider the following commands:
$ awk 'BEGIN { system("ed") }'
q
$ echo hello | awk 'BEGIN { system("ed") }'
?
$
In the first case, I was able run ed and then stay in the editor and manually quit with the q command; but in the second, ed automatically exited. Why doesn't the ed interactive session work in the second command? Is there any way to run the AWK system function to call an interactive command while in a pipeline?
Asked by mbigras
(3472 rep)
Mar 20, 2025, 01:04 AM
Last activity: Mar 20, 2025, 01:34 AM
Last activity: Mar 20, 2025, 01:34 AM