ASCII file


 
Thread Tools Search this Thread
Special Forums UNIX Desktop Questions & Answers ASCII file
# 1  
Old 06-13-2003
ASCII file

I've been having trouble trying to read an ASCII file. I'm on an IRIX machine, by the way. I've tried "cat" and I get a bunch of unreadable text, and the "string" command gets the "Command not Found" error. Please advise.

Thanks.
# 2  
Old 06-13-2003
What does unreadable mean? There is no guarantee that ascii files are intelligible. If I use an editor to put these lines:
Code:
jdkennfckgfgm
ttjghkhkjkjkjkdd
xnxndmrmkfkfmf

in a file, all that "cat" can do is display what I typed. Suppose that I call that file "UnderstandingImmanuelKant" and send it to you. You still will only see those three lines of garbage. That is simply all that is in the file.

And maybe you are wrong in thinking that the file is an ascii file? What makes you think that it is?

Anyway the "strings" command (not string) can pull ascii strings out of a binary file.

There is also a "od" command that can show the value of the bytes. And a "more" command that might be useful.

But I suspect that you have a garbage file.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

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

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

5. Shell Programming and Scripting

convert file to ascii

I have a file in below format(ISO ) and to be convert to readable (.txt/Ascii) format .send me the commands/code please sample as follows 2043010101167157001190002010011120000000002144300000000000000000000 01022_ - %rE@ U...ug  47 56   d %rE@ 01022_ - $5 fy ... (1 Reply)
Discussion started by: nalakaatslt
1 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. HP-UX

how to read ascii file in HP-UX

Hello All, I need to read the data inside one file who's format is ascii text. I got the file format when I use file command on the file. file <filename> filename ascii text please help me on this. Thanks (8 Replies)
Discussion started by: gyanusoni
8 Replies

8. Shell Programming and Scripting

Binary or ascii file

I want to verify the file is Binary or ascii file and accordingly I want to switch the program with ret code ie 0 or success and 1 for failure Can any one help me is this a correct syntex...i am getting error #!/bin/ksh $file filename if echo "ascii fie Found" else echo " binary... (6 Replies)
Discussion started by: u263066
6 Replies

9. Shell Programming and Scripting

How to convert English text file to ASCII File?

file abc abc: English text I want to convert the above into file abc file: ascii text (1 Reply)
Discussion started by: laknar
1 Replies

10. UNIX for Dummies Questions & Answers

How to determine if a file is ASCII?

I'm writing a script that takes a filename as an argument, which determines the "file type" of the file. I want to know if there is any command I can use to determine if a file is ASCII type, thanks all for giving a help. (11 Replies)
Discussion started by: popo
11 Replies
Login or Register to Ask a Question