editor - ed - quoting control characters? -


how can search control characters in unix ed(1)?

for example

ed somefile.log <<eof 1,$s/.*\015// w q eof 

doesn't work. neither \r. sed(1), awk(1) , other editors can this, ed has useful line move (m) command need within bash script using.

i able accomplish want within script entering control character directly (escaping c-v in vi, c-q in emacs example), means binary characters must present in otherwise printable text script.

ed transport2svn-w0177.log <<eof g/^m/s/.*^m//p w q eof 

the ^m character 0x0d.


Comments

Popular posts from this blog

java - Jasper subreport showing only one entry from the JSON data source when embedded in the Title band -

serialization - Convert Any type in scala to Array[Byte] and back -

SonarQube Plugin for Jenkins does not find SonarQube Scanner executable -