VI Editor - question for unix gurus !!


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting VI Editor - question for unix gurus !!
# 1  
Old 03-10-2009
VI Editor - question for unix gurus !!

I have created a dummy file -demo.txt

On my machine-A (oslevel-5300-08) I can display the file content in HEX format through VI editor using :%!xxd but on other machine-B (oslevel - 5300-06) , I get error as "sh: xxd: not found."

machine-A:
$ cat demo.txt
Hello World !

I can display the file content in HEX format through VI editor using :%!xxd

$ vi demo.txt
"demo.txt" 1 line, 14 characters
0000000: 4865 6c6c 6f20 576f 726c 6420 210a Hello World !.

machine-B
sh: xxd: not found.

can anyone tell me what is problem and how to fix this?
# 2  
Old 03-10-2009
Your problem is that xxd isn't a built-in of vi(m), but an external program, which is invoked by vi(m) as a filter (that the :%! part)

Either you installed it seperately on machine-A OR it isn't in the path on machine-B OR someone accidentally deleted it on machine-B
# 3  
Old 03-10-2009
Thanks for your reply....

definitely...these are NOT the cases...
- Either you installed it seperately on machine-A
- someone accidentally deleted it on machine-B

How can I check that?
"it isn't in the path on machine-B"
# 4  
Old 03-10-2009
First, you should check to see if xxd exists on the machine(s) and then adjust your PATH accordingly.
# 5  
Old 03-10-2009
How I should check if xxd exists on the machine(s)? cmd?
# 6  
Old 03-10-2009
You can use the find command.
# 7  
Old 03-10-2009
yep, there is diff....

$ which xxd
/@sys/nosupp/bin/xxd
==========================
# which xxd
which: 0652-141 There is no xxd in /usr/bin /etc /usr/sbin /usr/ucb /usr/bin/X11 /sbin /usr/java14/jre/bin /usr/java14/bin /usr/local/bin /bin.
==========================

so how and from I can install xxd? if you can give some details it will b gr8.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Vi editor question

in Vi how do I delete part of a line ( leave few words in a line and delete rest of the line ) (6 Replies)
Discussion started by: pitagi
6 Replies

2. Shell Programming and Scripting

Question to gurus with expect

Hi., I need to ask question for expect script. I have prompt like # and very long script (orachk). I added to expect script line set prompt "(%|#|\\\$) $" and insert into it also piece of code ---- expect { timeout { puts "Running..." exp_continue } ... (0 Replies)
Discussion started by: beckss
0 Replies

3. Shell Programming and Scripting

Question to gurus about sed.

Hi Folks. I need change something into file and after all manipulation I need delete only last COMMA into this piece of code -> GROUP 1 ( '/oralog1/ORAPRD/log01a.dbf', '/oralog2/ORAPRD/log01b.dbf' ) SIZE 512M, GROUP 2 ( '/oralog1/ORAPRD/log02a.dbf', ... (12 Replies)
Discussion started by: beckss
12 Replies

4. Shell Programming and Scripting

Need Urgent Help from UNIX gurus to get specific data from a file

Hi, I have a file monitor.txt as below... # Times are converted to local time from GMT. # Local Timezone: EST (GMT -05:00) PARAM1 { TIME 30; CC1 "xxxxx"; CC2 "xxxxx"; CC3 "xxxxx"; CC4 "xxxxx"; } PARAM2 { 4061 :... (3 Replies)
Discussion started by: zaq1xsw2
3 Replies

5. Shell Programming and Scripting

Unix gurus : how to grep this pattern?

Hello Unix gurus, My log file has entries in below format : ================================================================= 2009-01-19-01.19.24.816169+660 I8635A1158 LEVEL: Error PID : 5873782 TID : 1 PROC : aaaa APPHDL : 0-269 AUTHID : PDBCMPC... (12 Replies)
Discussion started by: Rahulpict
12 Replies

6. Shell Programming and Scripting

Unix/Linux gurus...here is Q 4u

Suppose I have two files 1.txt and 2.txt. My aim is to find (Total execution time/Number of executions) then sort the result as in decreasing order. Can anyone provide me any shell/perl/awk script or a Command to do that in faster way ? 1.txt : =============================== Number of... (4 Replies)
Discussion started by: Rahulpict
4 Replies

7. Shell Programming and Scripting

Help with shell script - Unix Gurus calling

Unix Gurus, I have been breaking my head to get this done..seems simple.. I need to read a flat file and based on a key word in a line, i need to skip the previous 3 lines. eg : Line1 Line2 Line3 Line4 Line5 Line6 Error Line7 Line8 Line9 Error Line10 (4 Replies)
Discussion started by: ravred
4 Replies

8. UNIX for Dummies Questions & Answers

VI Editor question

When I use vi, I can type "set nu" in command mode to get line numbers. How can I get VI to start like that automatically? (2 Replies)
Discussion started by: BG_JrAdmin
2 Replies

9. UNIX for Advanced & Expert Users

Any RF unix gurus out there?

I am having a problem here. We are having several problems in regards to hung process's on unix (HPUX box), caused by my RF equipment (Mobile data capture units). these contact the host via a simply telnet session and locks the system? Is it a timeout problem as the timeout is disabled on the host. (5 Replies)
Discussion started by: Subrosa
5 Replies
Login or Register to Ask a Question