mirror of
https://github.com/onceupon/Bash-Oneliner.git
synced 2024-11-22 12:57:01 +00:00
add sed
This commit is contained in:
parent
12370acf8a
commit
35656ea015
@ -158,6 +158,7 @@ sed -i '$ s/.$//' filename
|
||||
```
|
||||
|
||||
#####add string to end of file (e.g. "]")
|
||||
|
||||
```bash
|
||||
sed '$s/$/]/' filename
|
||||
```
|
||||
@ -173,6 +174,12 @@ sed -e 's/$/\}\]/' filename
|
||||
sed 's/.\{4\}/&\n/g'
|
||||
```
|
||||
|
||||
#####concatenate/combine/join files with a seperator and next line (e.g seperate by ",")
|
||||
|
||||
```bash
|
||||
sed -s '$a,' *.json > all.json
|
||||
```
|
||||
|
||||
#####substitution (e.g. replace A by B)
|
||||
|
||||
```bash
|
||||
|
Loading…
Reference in New Issue
Block a user