mirror of
https://github.com/onceupon/Bash-Oneliner
synced 2024-11-23 05:03:52 +00:00
add sed
add newline to the end
This commit is contained in:
parent
5c8c94171c
commit
7171f58f7a
1 changed files with 5 additions and 0 deletions
|
@ -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 a new issue