Bug 15781 - Need support for -E option in awk
Summary: Need support for -E option in awk
Status: NEW
Alias: None
Product: Busybox
Classification: Unclassified
Component: Other (show other bugs)
Version: 1.35.x
Hardware: All Linux
: P5 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-09-21 00:10 UTC by Philip Prindeville
Modified: 2023-09-21 00:26 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philip Prindeville 2023-09-21 00:10:28 UTC
When embedding a script in a file as "#!/usr/bin/awk -f", awk will hungrily consume anything that looks like an flag, hiding them from the script itself.

The -E option allows the embedded script to see the flags that were passed on the command line, so that the script itself might have some flag processing ability.

Otherwise, one always has to invoke the script with "-- flags... options..." instead which is ugly and counter-intuitive; and if you're rewriting an existing script from another language (say 'sh') into awk, this breaks transparency/compatibility.