If you find yourself needing to replace a forward slash character, for instance, in a path, with another character, you can use the code snippet below. This script replaces a forward slash with an underscore in a hard coded string: new_var=$(echo "/path/to/directory" | sed -e ‘s///_/g’) This script replaces a forward slash with an underscore […]
Read More