We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8fc72dd commit 560a55aCopy full SHA for 560a55a
'sed'.md
@@ -97,8 +97,9 @@ a\
97
`-n -e '/.../{x;p;d;}' -e x` : print 1 line above matched
98
`$(( $( sed -n '/.../=' $file ) - <n> ))' <x>'` : \<n\> line prior to matched
99
100
-`sed -i -e :a -e '/^\n*$/{$d;N;};/\n$/ba'` : remove all trailing new lines
101
-`sed -i -e '$a\'` : add a trailing new line if not exist
+`sed -i -e :a -e '/^\n*$/{$d;N;};/\n$/ba'` : remove all trailing new lines
+or `printf '%s\n' "$( cat file )"`
102
+`sed -i -e '$a\'` : add a trailing new line if not exist
103
104
**string operations**
105
alternative: [simple brace expansion](https://github.com/rern/bash_tips/blob/master/string_extract_edit.md)
0 commit comments