mirror of
https://github.com/onceupon/Bash-Oneliner
synced 2025-03-08 17:17:18 +00:00
add variable replacement
This commit is contained in:
parent
4b1d481eb8
commit
2461aa5048
1 changed files with 6 additions and 0 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue