Skip to content

Instantly share code, notes, and snippets.

@sshongru
Created May 28, 2013 23:09
Show Gist options
  • Save sshongru/5666846 to your computer and use it in GitHub Desktop.
Save sshongru/5666846 to your computer and use it in GitHub Desktop.
Replaces all occurrences of A with B
#!/bin/sh
# parse the test name from the path to the input file (/path/to/myTest.input => _path_to_myTest.input)
TEST_NAME=${1}
TEST_NAME=${TEST_NAME//A/B}
#TEST_NAME=${TEST_NAME/A/B} -> replace first occurrence
echo ${TEST_NAME}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment