diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2022-03-24 04:06:42 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2022-03-24 04:06:42 -0700 |
commit | 72d01494705ddb72237ee6a85ea27491684c7227 (patch) | |
tree | 11607e284d6f1c0695f6590bf293ca4248a1d312 | |
parent | 39c8fd12550671adac2a44061a5646d0102e95db (diff) | |
download | cppawk-72d01494705ddb72237ee6a85ea27491684c7227.tar.gz cppawk-72d01494705ddb72237ee6a85ea27491684c7227.tar.bz2 cppawk-72d01494705ddb72237ee6a85ea27491684c7227.zip |
don't delete hash-bang line; replace with #
This preserves the line numbers.
-rwxr-xr-x | cppawk | 2 | ||||
-rw-r--r-- | testcases | 9 |
2 files changed, 10 insertions, 1 deletions
@@ -37,7 +37,7 @@ prepro_opts="-D__gawk__=1 -D__cppawk_ver=20220324" awk_file= awk_opts= tmp_file= -delhashbang="sed -e /^#!/d --" +delhashbang="sed -e 1s/^#!.*/#/ --" prepro_only= selfdir=$(dirname "$0") @@ -223,3 +223,12 @@ foo bar baz +-- +40: +./cppawk '#!hashbang +BEGIN { print __LINE__ + + print __LINE__ }' +: +2 +4 |