Last active
July 26, 2019 08:15
-
-
Save beeender/feecbc3c4df449f773ab773d4c3a051b 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
sub() { | |
to_replace="" | |
for var in "$@" | |
do | |
if [ -z "$to_replace" ] | |
then | |
to_replace=$var | |
else | |
RAW_STR=$(echo $RAW_STR | sed "s/${to_replace}/${var}/g") | |
to_replace="" | |
fi | |
done | |
echo "${RAW_STR}" | |
} |
liming01
commented
Jul 26, 2019
•
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment