Thread: sed and hex
View Single Post
  #1   (View Single Post)  
Old 10th July 2008
na5m na5m is offline
New User
 
Join Date: Jul 2008
Posts: 4
Default sed and hex

I'm using OpenBSD 4.3. I'd like to be able to insert an arbitrary hexcode into a text file. For example, I'd like to hyphenate the word "gratefull" using sed so that "gratefull" becomes "grate-full". I've tried
Code:
sed 's/gratefull/grate\x2dfull/' document.txt
to no avail. I know I could use Ctrl-v, but I'd really like to be able to insert any hex value into my text file using the backslash construct. I'm sure you can do this with GNU sed, but as I've stated, I'm using OpenBSD. Any help is appreciated. Thanks!
Reply With Quote