From dee4ce5171c0f8e1fd82cc3f8b55174138a6abca Mon Sep 17 00:00:00 2001 From: Savil Srivastava Date: Fri, 20 Jul 2018 23:00:31 -0700 Subject: [PATCH] [fuzz] remove \L in sed regex for filenames in gen_target.sh Summary: on `master` branch, if i ran `gen_target.sh` i would get the following output: https://gist.github.com/savil/2b3114eaf34c3ef8499b65005e374841 Without it, I get the files generated that are already checked-in (as expected). Looking at the sed docs (https://www.gnu.org/software/sed/manual/html_node/Regular-Expressions.html) i don't see an explanation for what `\L` may do in whatever regex sed follows. Does this look correct? cc @yuntai --- fuzz/fuzz_targets/msg_targets/gen_target.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fuzz/fuzz_targets/msg_targets/gen_target.sh b/fuzz/fuzz_targets/msg_targets/gen_target.sh index 8e9ed04da..a74319f4f 100755 --- a/fuzz/fuzz_targets/msg_targets/gen_target.sh +++ b/fuzz/fuzz_targets/msg_targets/gen_target.sh @@ -1,5 +1,5 @@ for target in CommitmentSigned FundingCreated FundingLocked FundingSigned OpenChannel RevokeAndACK Shutdown UpdateAddHTLC UpdateFailHTLC UpdateFailMalformedHTLC UpdateFee UpdateFulfillHTLC AcceptChannel ClosingSigned; do - tn=$(echo $target | sed 's/\([a-z0-9]\)\([A-Z]\)/\1_\L\2/g') + tn=$(echo $target | sed 's/\([a-z0-9]\)\([A-Z]\)/\1_\2/g') fn=msg_$(echo $tn | tr '[:upper:]' '[:lower:]')_target.rs cat msg_target_template.txt | sed s/MSG_TARGET/$target/ > $fn done -- 2.39.5