![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| HP-UX HP-UX (Hewlett Packard UniX) is Hewlett-Packard's proprietary implementation of the Unix operating system, based on System V. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Binary or ascii file | u263066 | Shell Programming and Scripting | 6 | 08-08-2008 12:19 PM |
| How to convert English text file to ASCII File? | laknar | Shell Programming and Scripting | 1 | 07-23-2008 10:37 AM |
| Hex characters of ascii file | budrito | HP-UX | 2 | 08-10-2005 11:26 PM |
| ASCII file | sherbet808 | UNIX Desktop for Dummies Questions & Answers | 1 | 06-13-2003 10:46 PM |
| How to determine if a file is ASCII? | popo | UNIX for Dummies Questions & Answers | 11 | 02-05-2002 05:00 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
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 |
|
||||
|
Thanks for your quick response.
I tried the script and it gives me the the information line wise like how many character are there in each line but the contents are not in readable format. it gives me below output ] M-^?M-^?M-^?M-^?M-^?M-^?M-^?M-^?M-^?M-^?M-^?M-^?M-^?M-^?M-^?M-^?M-^?M-^?M-^?M-^?M-^?M-^?M-^?M-^? this line has 26 characters ]@ this line has 2 characters ^P |
|
||||
|
Quote:
If that's the case, you can do # more <filename> - Read the file page by page. # vi <filename> - Edit the file using vi editor (However, it shows the content) # cat <filename> - Would print the content of a file. I'm sorry if am talking something irrelevant to situation here since Jim has given a mini script. I wasnt sure, however, if you want to read the content of a file using a command the above should work. -DB |
|
||||
|
Hi DustBunny
Thanks for your reply Yes I want to read file which is in ascii format and then I tried more, cat commands to read but it gives me o/p which is not understandable below is the o/p ^B^B^A^B^B^B^B^B^B^B^B^A^G^B^B^B^A^G^B^A^B^B^A^B^B^B^A^B ^A^B^B^B^B^B^B^B^B^B^B^A^B^B^B^B^B^B^B^B^B^B^B^B^B^B ^A^B^A^B^G^B^B^B^B^B^B^B^A^B^B^B^B^B^B^B^B^B^B^B^B ^B^G^B^A^B^B^B^B^A^B^B^B^B^B^A^B^B^A^B^F^A^B^B^B^B^A^A^A^B ^B^B^A^B^A^B^B^A^B^B^B^B^B^A^B^G^B^B^A^B^A^B^B^B^B^B^B^B ^B^B^A^B^B^B^B^B^A^B^B^B^B^A^B^B^B^B^B^B^B^A^B^A^A^B^B^B ^B^B^B^B^B^B^A^A^A^B^B^B^B^B^B^B^B^A^B^A^B^B^B^B^B^T^B ^G^B^B^B^B^B^B^B^B^B^B^B^B^B^B^B^B^B^A^B^B^B^B^B^B And the same response from dos2ux command. I tried the strings command too it gave me the some o/p but not all it chop up the contents while displaying as it reduces the file size. Last edited by gyanusoni; 10-22-2008 at 08:55 AM.. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|