add newline to the end
This commit is contained in:
onceupon 2017-05-10 16:18:56 +08:00 committed by GitHub
parent 5c8c94171c
commit 7171f58f7a

View File

@ -187,6 +187,10 @@ sed -i '$ s/.$//' filename
```bash
sed '$s/$/]/' filename
```
##### add newline to the end
```bash``
sed '$a\'
```
##### add string to beginning of every line (e.g. bbo)
@ -313,6 +317,7 @@ sed '$ s/.$//'
sed -r -e 's/^.{3}/&#/' file
```
## Awk
[[back to top](#handy-bash-oneliner-commands-for-tsv-file-editing)]