@ character in vi editor


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting @ character in vi editor
# 1  
Old 10-23-2010
@ character in vi editor

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
# 2  
Old 10-23-2010
use od utility to find out, what it is really...

refer OD Command Usage Examples
# 3  
Old 10-23-2010
Are you sure it in an ASCII format ?

run the command "file" on yourfile like this :

Code:
# file yourfile

Example :

Code:
[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

Code:
[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 ~]$

# 4  
Old 10-23-2010
I don't get your concern. "@" are just valid ascii characters. Maybe have you nulls but they would be displayed as "^@" by vi.
# 5  
Old 10-23-2010
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 :
Code:
:se list

to turn off :
Code:
:se nolist

(This was the lazy way ... otherwise you also could type :set list or :set nolist)
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

sed searches a character string for a specified delimiter character, and returns a leading or traili

Hi, Anyone can help using SED searches a character string for a specified delimiter character, and returns a leading or trailing space/blank. Text file : "1"|"ExternalClassDEA519CF5"|"Art1" "2"|"ExternalClass563EA516C"|"Art3" "3"|"ExternalClass305ED16B8"|"Art9" ... ... ... (2 Replies)
Discussion started by: fspalero
2 Replies

2. UNIX for Dummies Questions & Answers

Ctrl-V + Ctrl-J for newline character does not work inside vi editor

Hi friends, I am trying to add a newline char ('\n') between the query and the commit statement in the following shell script. #! /bin/sh echo "select * from tab; commit;" > data.sql I have tried typing in "Ctrl-V + Ctrl-J" combination which has inserted ^@ (NUL) character but the commit... (1 Reply)
Discussion started by: royalibrahim
1 Replies

3. UNIX for Dummies Questions & Answers

"vi" text editor character encoding?

Hi! I've got a shell account on a FreeBSD machine. It doesn't have 'vim' installed, but only the original 'vi' text editor ("Version 1.79 (10/23/96) The CSRG, University of California, Berkeley.") So, in PuTTY I've chosen "UTF-8 translation" to have my non-english characters appear correctly.... (2 Replies)
Discussion started by: Gew
2 Replies

4. Shell Programming and Scripting

Appending character "0" in vi editor for all lines between 1 and 40.

I have to append character "0" for lines between 1 and 40 in a file. I tried the following code. :s/^0,1,40/g Input: Output: (2 Replies)
Discussion started by: pinnacle
2 Replies

5. Shell Programming and Scripting

read in a file character by character - replace any unknown ASCII characters with spa

Can someone help me to write a script / command to read in a file, character by character, replace any unknown ASCII characters with space. then write out the file to a new filename/ Thanks! (1 Reply)
Discussion started by: raghav525
1 Replies

6. Solaris

Epic Editor was not able to obtain a license for your use. Feature Epic Editor :Licen

Epic Editor was not able to obtain a license for your use. Feature Epic Editor :License server is down (1 Reply)
Discussion started by: durgaprasadr13
1 Replies

7. SuSE

<92> unknown character when opened with Vi editor in Linux

Hi, One of our applications has this string : xxx ¿ yyyyy We are on Linux Suse and the character set is en_US.UTF-8. Our requirement is to replace this special character ¿ with a space. When we open the file containing this string using VI editor we see the same character as <92> xxx... (10 Replies)
Discussion started by: LinuxTest
10 Replies

8. 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

9. UNIX for Dummies Questions & Answers

Pasting text in VI editor from a different editor

Hi, I knw its a silly question, but am a newbie to 'vi' editor. I'm forced to use this, hence kindly help me with this question. How can i paste a chunk 'copied from' a different editor(gedit) in 'vi editor'? As i see, p & P options does work only within 'vi'. (10 Replies)
Discussion started by: harishmitty
10 Replies

10. UNIX for Dummies Questions & Answers

underline character in vi editor

I want to print a man page for a command in unix, this is what I did man command > command.txt but when I view the output file command.txt I found there are lot of _^H characters that in the man page are actually underline character, how can I replace this _^H with underline character? ... (2 Replies)
Discussion started by: Melissa
2 Replies
Login or Register to Ask a Question