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
Post a Comment