Can't able to view the data in a file using the VI editor


 
Thread Tools Search this Thread
Operating Systems AIX Can't able to view the data in a file using the VI editor
# 1  
Old 02-20-2013
Can't able to view the data in a file using the VI editor

I am unable to view the data in a file using the vi editor.....it is showing as all @ ( at the rate symbols).

When I use the cat command, it showing the data.

Please help me to how to view the data in VI editor, as I need to edit the data. Even I tried to edit using sed but that couldn't help in editing it.


Thanks,
Surendra
# 2  
Old 02-20-2013
Try od -c | more to see if there are lots of control characters (i.e. between octal 000 and 017).

I cannot think of it offhand, but anyone familiar with tr can give you a quick command to filter out non-printable characters. I just do not do that often enough to type it from memory.
# 3  
Old 02-20-2013
I couldn't find any special character except space ( showing as sp) using the<code>od -c</code> command.
# 4  
Old 02-20-2013
What's your locale?
# 5  
Old 02-20-2013
Code:
LANG=en_GB
LC_COLLATE="en_GB"
LC_CTYPE="en_GB"
LC_MONETARY="en_GB"
LC_NUMERIC="en_GB"
LC_TIME=C
LC_MESSAGES="en_GB"
LC_ALL=

I could also see another locale which is specific to the application

Code:
English_UnitedStates.Latin1@Binary


Last edited by zaxxon; 02-20-2013 at 07:58 AM..
# 6  
Old 02-20-2013
Pls give us SOME lines of your file in binary, e.g. od -tx1 file.
# 7  
Old 02-20-2013
Code:
0000000  55 4e 42 2b 55 4e 4f 41 3a 33 2b 35 39 30 39 30
0000020  30 30 37 38 39 30 36 37 3a 31 34 2b 35 30 30 30
0000040  31 31 39 30 30 30 30 30 36 3a 31 34 2b 31 33 30
0000060  32 31 39 3a 30 38 31 31 2b 36 35 35 37 30 30 30
0000100  30 31 30 30 30 31 30 2b 2b 49 4e 56 4f 49 43 2b
0000120  2b 2b 2b 31 27 55 4e 48 2b 31 2b 49 4e 56 4f 49


Last edited by tsurendra; 02-20-2013 at 08:05 AM..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. What is on Your Mind?

New jQuery to view Post Icons in Editor

I was reformatting the "advanced" WYSIWYG editor with bootstrap css and while there made the post icons to be invisible by default; so if you click on the text below the editor: Post Icons - Click to view the full list of message icons to add to your post: ... (0 Replies)
Discussion started by: Neo
0 Replies

2. What is on Your Mind?

Moving from Desktop View to Mobile View

See attached video for a demo on how to move back and forth from the desktop view to the mobile view. Currently this only works for the home page, but I will work on some new PHP code in the future to make this work with the page we are currently on. Edit: The issue with making every page ... (2 Replies)
Discussion started by: Neo
2 Replies

3. Shell Programming and Scripting

I want a script to view the complete log information of data stage job from UNIX IBM AIX.

Hi, I am working on data stage 8.7 version and I want a script a to view the all log information of the data stage job from UNIX environment. Can you please help me out by give the script. Thanks in advance... (7 Replies)
Discussion started by: victory
7 Replies

4. UNIX for Dummies Questions & Answers

Copy huge data into vi editor

Hi All, HP-UX dev4 B.11.11 U 9000/800 3251073457 I need to copy huge data from windows text file to vi editor. when I tried copy huge data, the format of data is not preserverd and appered to scatterd through the vi, something like give below. Please let me know, how can I correct this? ... (18 Replies)
Discussion started by: alok.behria
18 Replies

5. Shell Programming and Scripting

View Data in XML file

I'm unable view data of a xml file..i just display something like the attached. Please see the attached. I'm trying to create a script which would prase the xml file and display the content. since the content is encoded..i'm unable to see the actul data using my script. Thank you! (6 Replies)
Discussion started by: rocker_me2002
6 Replies

6. UNIX for Dummies Questions & Answers

not able to view the file

Hi All, I am experiencing a strange and serious issue. I can see, a file exist there inside a directory while doing cat i can see the file exists, but while trying to view that its saying NO such File or Directory. (ipbala01)/env/balast7/app/working/batch_loader/data/system_2/input>ll total 12... (8 Replies)
Discussion started by: gotam
8 Replies

7. Solaris

How do I view file?

I am trying to view the files in /etc/security/audit/SERVERNAME/files, but when I gunzip them and then do a cat I get a bunch of garbage with some stuff that makes sense. I need to view this file without having all the garbage. I tried to cat it and vi it without any luck. Can someone show me an... (4 Replies)
Discussion started by: jastanle84
4 Replies

8. Shell Programming and Scripting

Command to view full data "export MAESTRO_OUTPUT_STYLE=LONG"

Hi, Always when I login to Unix, I need to give the following command to view the data properly; export MAESTRO_OUTPUT_STYLE=LONG The reason is that by default the settings export MAESTRO_OUTPUT_STYLE=SHORT Please let me know how I could make LONG as the default and avoid giving the... (1 Reply)
Discussion started by: jmathew99
1 Replies

9. Shell Programming and Scripting

set EDITOR=vi -> default editor not setting for cron tab

Hi All, I am running a script , working very fine on cmd prompt. The problem is that when I open do crontab -e even after setting editor to vi by set EDITOR=vi it does not open a vi editor , rather it do as below..... ///////////////////////////////////////////////////// $ set... (6 Replies)
Discussion started by: aarora_98
6 Replies

10. UNIX for Advanced & Expert Users

Gnuplot question: plotting 3D data in map view

I have a simple gnuplot question. I have a set of points (list of x,y,z values; irregularly spaced, i.e. no grid) that I want to plot. I want the plot to look like this: - map view (no 3D view) - color of each point should depend on z-value. - I want to define my own color scale - plot should... (1 Reply)
Discussion started by: karman
1 Replies
Login or Register to Ask a Question