Substitution with wildcard (e.g. replace a line start with aaa= by aaa=/my/new/path)
This commit is contained in:
onceupon 2017-12-29 17:30:49 +08:00 committed by GitHub
parent 5a34554eea
commit 099fe975c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -262,6 +262,12 @@ sed -s '$a,' *.json > all.json
```bash ```bash
sed 's/A/B/g' filename sed 's/A/B/g' filename
``` ```
##### Substitution with wildcard (e.g. replace a line start with aaa= by aaa=/my/new/path)
```bash
sed "s/aaa=.*/aaa=\/my\/new\/path/g"
```
##### Select lines start with string (e.g. bbo) ##### Select lines start with string (e.g. bbo)
```bash ```bash