Created
September 9, 2021 10:32
-
-
Save steshaw/ba6131b492ee1bfea14fe6886ef94083 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -euo pipefail | |
# Explanation of strange Perlness: | |
# | |
# * -0400 means that we slurp the whole file rather than operating on a | |
# line-by-line basis. | |
# * /gms means global, multiline, '.' can match '\n' (probably not needed in | |
# this case). | |
# | |
perl -00400 -i -pe 's/^}\nfunc/}\n\nfunc/gms' "${@}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment