Solved

How to open Vi editor in hexadecimal mode?

Posted on 2006-11-22
2
1,321 Views
Last Modified: 2008-02-01
I am using a vi editor in a solaris environment and I want to open a binary log file contains all addresses which has been extracted from a switch.I want to display the contents in it in a hexadecimal format.How can i do the same using vi editor ?

And also ow can I use a emacs editor to do the same?
0
Comment
Question by:tatikor_143
  • 2
2 Comments
 
LVL 45

Accepted Solution

by:
Kdo earned 500 total points
ID: 17997299


Vi won't edit the binary file as it deals with text strings.

However, you can use xxd to convert the file, edit it, and use xxd to convert it back.

Put it in a small shell script and it looks like a single command.  :)

xxd oldfile tempfile
vi tempfile
xxd -r tempfile oldfile


Good Luck,
kent
0
 
LVL 45

Expert Comment

by:Kdo
ID: 17997304

I guess that this should be moved to the unix forum, but most of the C experts here are unix geeks, too.  :)  


Besides, we're friendlier over here.
Kent
0

Featured Post

ScreenConnect 6.0 Free Trial

Want empowering updates? You're in the right place! Discover new features in ScreenConnect 6.0, based on partner feedback, to keep you business operating smoothly and optimally (the way it should be). Explore all of the extras and enhancements for yourself!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
memory mapped I/O query 6 142
My eclipse editor won't start ? 4 144
mixing C++ and C code elegantly 10 153
How to build c program using make in mingw environment? 9 54
Preface I don't like visual development tools that are supposed to write a program for me. Even if it is Xcode and I can use Interface Builder. Yes, it is a perfect tool and has helped me a lot, mainly, in the beginning, when my programs were small…
This tutorial is posted by Aaron Wojnowski, administrator at SDKExpert.net.  To view more iPhone tutorials, visit www.sdkexpert.net. This is a very simple tutorial on finding the user's current location easily. In this tutorial, you will learn ho…
The goal of this video is to provide viewers with basic examples to understand and use pointers in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use structures in the C programming language.

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now