![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to convert C source from 8bit chars to 16bit chars? | siegfried | Shell Programming and Scripting | 0 | 09-26-2007 11:26 AM |
| cut last 4 chars | pbsrinivas | Shell Programming and Scripting | 5 | 06-28-2007 09:14 PM |
| replace chars, | Jairaj | Shell Programming and Scripting | 7 | 02-28-2007 02:34 AM |
| to append few chars at the end of a file | trichyselva | Shell Programming and Scripting | 2 | 08-02-2006 04:39 AM |
| Awk- catching the last two chars | Gerry405 | UNIX for Dummies Questions & Answers | 9 | 11-22-2005 02:23 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
|||
|
Using SED to get n chars after given value from file
Hello, my name is Marc, I'm a linux starter
I have a file containing a lot of data. Somewhere in this file, there's a string called "Faultdump", directly followed by 64 chars of HEX data. I need to get the HEX part. I accomplished this with several lines of code in a script calling sed, cut as well as head/tail. I know some of you guys will manage to get this on one line by using just awk or sed by avoiding cat or head/tail. Please can anyone of you point me to the right direction? I was searching through the forums, but I'm afraid, I couldn't find an appropriate example. Many thanks in advance! Marc (Kally). |
| Forum Sponsor | ||
|
|
|
|||
|
Thanks Tytalus, I'll try it later. Looks a lot better than my commandlines.
If someone else has got another approach (using sed or awk completely alone), I'll appreciate that. Anyway, I'm fine with Tytalus' solution, though. Many thanks. |