Created
December 1, 2009 09:13
-
-
Save scottwb/246177 to your computer and use it in GitHub Desktop.
String replacement in a string var in bash.
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
#!/bin/sh | |
# Shows how to do replacment in a string variable in bash. | |
SRC_STRING=/Applications/something | |
REPLACED_STRING=${SRC_STRING//\//\\/} | |
echo "Source String is: $SRC_STRING" | |
echo "Replaced String is: $REPLACED_STRING" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment