add variable replacement

This commit is contained in:
onceupon 2017-10-27 11:13:54 +08:00 committed by GitHub
parent 4b1d481eb8
commit 2461aa5048

View File

@ -1323,6 +1323,12 @@ e.g. replace all
{i//a/,}
```
//for variable i, replace all 'a' with a comma
e.g. with grep
```bash
test="god the father"
grep ${test// /\\\|} file.txt
#turning the space into 'or' (\|) in grep
```
##### Read user input