DaemonForums  

Go Back   DaemonForums > Miscellaneous > Programming

Programming C, bash, Python, Perl, PHP, Java, you name it.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #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
 

Tags
hex, horizontal, sed, tab

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:32 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick