Created
December 1, 2022 12:09
-
-
Save Integralist/d9ba0028ce7c6b90280f73c71cb27cf5 to your computer and use it in GitHub Desktop.
[Write to a variable multiple times before writing to disk] #bash #shell #performance
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
function bar { | |
example=$(echo "$example" | rg $1 \ | |
--case-sensitive \ | |
--type go \ | |
--type md \ | |
--color never \ | |
--no-line-number \ | |
--passthru \ | |
--replace $2) | |
} | |
function foo { | |
example=$(<fastly-go/go.mod) | |
bar "github" "GITHUB" | |
bar "google" "GOOGLE" | |
echo "$example" > final.txt | |
cat final.txt | |
rm final.txt | |
} | |
foo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment