How to check if the file has EBCDIC or ascii characters


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting How to check if the file has EBCDIC or ascii characters
# 1  
Old 07-02-2010
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?
# 2  
Old 07-02-2010
Try:
Code:
file filename

This User Gave Thanks to bartus11 For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

EBCDIC to ASCII conversion

Hi, We have a mainframe file which is in EBCDIC format.We dont have direct access to mainframe ,client has provided us the mainframe file.The mainframe file is containing pact data(COMP1 ,COMP2 etc) which are unreadble.Can anyone suggest me how to convert this kind of ebcdic file to ascii... (11 Replies)
Discussion started by: swapna_1990
11 Replies

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

3. UNIX for Beginners Questions & Answers

Convert EBCDIC(.DAT) FILE into ASCII FILE

Hi Team, I am having 100 EBCDIC files (i.e. DAT extension) and need to convert them into ASCII File by unix shell script. I tried with DD Command but its not providing output as expected. Sample Text: ------------------ גהאבדוחס@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ Expected Output:... (2 Replies)
Discussion started by: JSM
2 Replies

4. Programming

Ebcdic to ascii

Hi, I want to convert ebcdic values to ascii values. Are there anyany specific c++ libraries with g++ compiler, which can do it ? gcc version 4.1.2 20080704 (Red Hat 4.1.2-54) (19 Replies)
Discussion started by: tostay2003
19 Replies

5. Red Hat

Unable to convert EBCDIC file to ASCII file

Hello all, To give you all a little bit of background. We recently migrated from HP-UX to Redhat Linux and one of the command I used to run on HP-UX to convert an EBCDIC file to ASCII file isn't working on Linux. The code is as follow: cat workout2.dat | dd cbs=250 conv=block conv=ascii... (3 Replies)
Discussion started by: sethmj
3 Replies

6. Shell Programming and Scripting

EBCDIC Format to ASCII

Hi, we have source file with EBCDIC format(Main Frame files) where we receving from source system. I would like to convert the EBCDIC format file to unix systemformat(ex: .csv,txt ) I have wrote script like: dd if=<SRCPATH>yyy.xxx.RB065 of=<SRCPATH>/output.csv ibs=800 cbs=80... (8 Replies)
Discussion started by: koti_rama
8 Replies

7. UNIX for Dummies Questions & Answers

Conversion from EBCDIC to ASCII

when i try to convert a mainframe EBCDIC file to ASCII ,i dont see correct file this is the source file ... (3 Replies)
Discussion started by: venkatvelpula
3 Replies

8. UNIX for Dummies Questions & Answers

How to convert ebcdic file to ascii file?

How to convert ebcdic file to ascii file? (1 Reply)
Discussion started by: superuser123
1 Replies

9. Shell Programming and Scripting

How to convert ebcdic file to ascii file?

How to convert ebcdic file to ascii file? (1 Reply)
Discussion started by: superuser123
1 Replies

10. Shell Programming and Scripting

ascii to ebcdic conversion

Hello, I need a program for ascii to ebsdic conversion. If anybody can help, it'll be greatly appreciated. Thanks. (1 Reply)
Discussion started by: er_ashu
1 Replies
Login or Register to Ask a Question