mirror of
https://github.com/onceupon/Bash-Oneliner.git
synced 2024-11-26 06:17:01 +00:00
add sed
add newline to the end
This commit is contained in:
parent
5c8c94171c
commit
7171f58f7a
@ -187,6 +187,10 @@ sed -i '$ s/.$//' filename
|
|||||||
```bash
|
```bash
|
||||||
sed '$s/$/]/' filename
|
sed '$s/$/]/' filename
|
||||||
```
|
```
|
||||||
|
##### add newline to the end
|
||||||
|
```bash``
|
||||||
|
sed '$a\'
|
||||||
|
```
|
||||||
|
|
||||||
##### add string to beginning of every line (e.g. bbo)
|
##### add string to beginning of every line (e.g. bbo)
|
||||||
|
|
||||||
@ -313,6 +317,7 @@ sed '$ s/.$//'
|
|||||||
sed -r -e 's/^.{3}/&#/' file
|
sed -r -e 's/^.{3}/&#/' file
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## Awk
|
## Awk
|
||||||
[[back to top](#handy-bash-oneliner-commands-for-tsv-file-editing)]
|
[[back to top](#handy-bash-oneliner-commands-for-tsv-file-editing)]
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user