how to check a file to contain only ascii charaters


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers how to check a file to contain only ascii charaters
# 1  
Old 10-06-2006
Error URGENT!!!Can any one help me to check a file to contain only ascii charaters

HI
I need to validate a file in UNIX to contain only ascii characters.This is a production issue.Can anyone help with the command?
Thanks
Subbarao

Last edited by srichakra9; 10-06-2006 at 12:44 PM.. Reason: URGENT
# 2  
Old 10-06-2006
ASCII compared to what EBCDIC?

7 bit ASCII characters are all less than 128 in decimal values (i.e. 0 - 127).
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Check if file is EBCDIC or ASCII format

So, i have this requirement where i need to check the file format, whether it's EBCDIC or ASCII, and based on format retrieve the information from that file: my file is: file1.txt-->this ebcdic file file2.txt-->ascii file i tried below code: file=file1.txt type="`file $file`" i get... (7 Replies)
Discussion started by: gnnsprapa
7 Replies

2. Shell Programming and Scripting

Convert Hex to Ascii in a Ascii file

Hi All, I have an ascii file in which few columns are having hex values which i need to convert into ascii. Kindly suggest me what command can be used in unix shell scripting? Thanks in Advance (2 Replies)
Discussion started by: HemaV
2 Replies

3. UNIX for Dummies Questions & Answers

After Ftp'ing file to destination how to check the file if it is in correct ASCII and not corrupted

Hi Folks, While transferring file from FTP software like Filezilla the files gets corrupted. Is there any way I can check if the recently transferred file is in ASCII and not corrupted. I have tried using file -i filename command which does tell if the file character set is ASCII or binary... (6 Replies)
Discussion started by: Khan28
6 Replies

4. Shell Programming and Scripting

How to check if the file has EBCDIC or ascii characters

Hi, is there a way to check if the initial few characters are ebcdic or ascii in a file? (1 Reply)
Discussion started by: ahmedwaseem2000
1 Replies

5. UNIX for Advanced & Expert Users

replace word with special charaters

I have input file called file1 with characters that have \\ in it. I cannot change input file, because it is generated earlier in script. Now would like to replace string on line in file called bfile with output from file1 I have been using sed command. $cat file1 pc//6sPxp== $ cat scr1... (4 Replies)
Discussion started by: drtabc
4 Replies

6. Shell Programming and Scripting

convert ascii values into ascii characters

Hi gurus, I have a file in unix with ascii values. I need to convert all the ascii values in the file to ascii characters. File contains nearly 20000 records with ascii values. (10 Replies)
Discussion started by: sandeeppvk
10 Replies

7. Shell Programming and Scripting

how to check the file data type(ascii or binary)

hi i am receiving a file from one system , i have to verify the format of the file data i.e whether the data is in acii format or binary format, please help thanks in advance satya (1 Reply)
Discussion started by: Satyak
1 Replies

8. Shell Programming and Scripting

Check whether a given file is in ASCII format and data is tab-delimited

Hi All, Please help me out with a script which checks whether a given file say abc.txt is in ASCII format and data is tab-delimited. If the condition doesn't satisfy then it should generate error code "100" for file not in ASCII format and "105" if it is not in tab-delimited format. If the... (9 Replies)
Discussion started by: Mandab
9 Replies

9. UNIX for Dummies Questions & Answers

Finding funny charaters in a string

Hi, I have got a little problem where some of the files I created had some funny characters e.g space ,"^M" etc inserted in the full file name and which caused our backup script to skip those files. Is it possible to find out if there are any funny charaters in a string ? Thanks, (4 Replies)
Discussion started by: ahjaeasedqa
4 Replies

10. Shell Programming and Scripting

Non-ASCII charaters in a unix file

Hi, Could you pls help me with the command to know the non-ascii characters in a unix file. Thanks (1 Reply)
Discussion started by: gaurav_gaba
1 Replies
Login or Register to Ask a Question