Update README.md

This commit is contained in:
onceupon 2018-01-03 12:21:42 +08:00 committed by GitHub
parent c9807c97c7
commit df9707071d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -368,12 +368,12 @@ sed 's=/=\\/=g'
sed 's/A-.*-e//g' filename sed 's/A-.*-e//g' filename
``` ```
##### Remove last character of file ##### Remove last character of file
```bash`` ```bash
sed '$ s/.$//' sed '$ s/.$//'
``` ```
##### Insert character at specified position of file (e.g. AAAAAA --> AAA#AAA) ##### Insert character at specified position of file (e.g. AAAAAA --> AAA#AAA)
```bash`` ```bash
sed -r -e 's/^.{3}/&#/' file sed -r -e 's/^.{3}/&#/' file
``` ```