Satyak
October 23, 2010, 2:14am
1
Hi,
I have received a file from in ASCII format. When I am viewing in the vi editor I could see the content like below
000700006098204 983004100 09910LATINA 09920LT 09930380
@ @ @ @
09870VIA AURELIO SAFFI
Could you please let me know when the @ characters will appear and why
Thanks
Satya
use od utility to find out, what it is really...
refer OD Command Usage Examples
ctsgnb
October 23, 2010, 7:12am
3
Are you sure it in an ASCII format ?
run the command "file" on yourfile like this :
# file yourfile
Example :
[ctsgnb@shell ~]$ file /users/home/ctsgnb/bin/ksh
/users/home/ctsgnb/bin/ksh: ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), statically linked, for FreeBSD 8.0 (800505), stripped
[ctsgnb@shell ~]$
here you can see that you are trying to dislay which in fact is an executable.
Your should then user the command strings instead of a cat or a vi ... (executable files or data files should not be edited with a text editor since they are binaries
[ctsgnb@shell ~]$ strings /users/home/ctsgnb/bin/ksh | tail
;; res_nopt_rdata()
;; res_nopt()
;; res_opt()... ENDS0 DNSSEC
;; res_nmkquery(%s, %s, %s, %s)
$FreeBSD: src/lib/csu/amd64/crtn.S,v 1.6.30.1 2009/08/03 08:13:06 kensmith Exp $
Service unavailable
RuneMagiNONE
0000000000000000
0123456789
FreeBSD
[ctsgnb@shell ~]$
I don't get your concern. "@" are just valid ascii characters. Maybe have you nulls but they would be displayed as "^@" by vi.
ctsgnb
October 23, 2010, 10:34am
5
if you want to turn on/off the display of special char in vi just press <escape> to switch in command mode and then
to turn on :
:se list
to turn off :
:se nolist
(This was the lazy way ... otherwise you also could type :set list or :set nolist)