Wordpad file in solaris

i have a file which i open in wordpad shows proper formated o/p column wise .. but same file which is txt file when i do cat in solaris shows grabbled o/p is there any way i can see the output same as wordpad or txt pad ? even in solaris ?

Following is the o/o when i do a #cat file.txt | more in soalris


1|HD5N301|HD5N302|HD5N303|HD5N304|HD5N401|HD5N402|HD5N403|HD5N404|HD5N405|HD5N406|HD5N407|HD6N101|HD6N102|HD6N201|LN1PO101|LN1PO102|LN1PO103|LN1PO104|LN1PO106|LN1PO107|LN1PO108|
LN1PO109|LN1PO110|LN1PO111|LN1MEA01|LN1MEA02|LN1MEA03|LN1MEA04|LN1PID01|LN1PID05|LN1TC201|LN1TC202|LN1TC205|LN1TC206|LN1TD401|LN1TD402|LN1MTX01|LN1MTX02|LN1MTX03|LN3N101|LN3N102
|LN3N103|LN3N104|LN3N201|LN3N301|LN3N302|LN3N303|LN3N304|LN3N401|LN3N402|LN3N403|LN3N404|LN3N405|LN3N406|LN3N407|LN3REF01|LN3REF02|LN3REF03|LN3REF04|LN4PER01|LN4PER02|LN4PER03|L
N4PER04|LN4PER05|LN4PER06|LN4PER07|LN4PER08|LN1SCH01|LN1SCH02|LN1SCH05|LN1SCH06|LN1SCH08|LN1SCH09|LN1SCH12|SUCTT01|SUCTT02|LN5PER02|LN1POC02|LN1PO105|LN1TXI06
00|ENP SURGE |00|          |ZZ|CNTRLCNCPTS    |ZZ|               |110310|1500|<|00502|         |0|P|>|PO|CNTRLCNCPTS    |               |20110310|150028  |         |X |005020
   |850|         |00|BK|501B31434004          |B31434000                     |20110310|                              |  |03|BY |USD|          |   |        |        |PP |0000000
                                                                        |S3 |ABC                                                                      |06 |501
                                                                 |K6 |MARK FOR: STOCK                                                                 |CC|ZZ|EMR2006
                                                            |ZZ|                                                                                |5TH 3RD PROX
                                                |L1 |PO HEADER INSTRUCTIONS TO SUPPLIER           |OTH|                    THANK YOU!!!!!!!!!!!!
      |****************I M P O R T A N T ***************************                   |VN |  Q CORP.                                 |93|501
                                                           |                                                            |                                     |
                                                       |                                                       |                                                       |MENTOR
                     |OH|44060                              |   |SU|                                                            |TE|
                                                     |FX|                                                                                |EM|

What does it look like in windows?

cat -vte is nice for seeing everything.

My first thought was unicode or utf8, but it looks very text-like.

In windows it looks like a column based file with dozens of columns and i did try cat -vte .. but it didn't help :frowning:

It is probably Solaris not recognizing the return carriages.. If you can, just copy and paste the contents of the wordpad file into a vi session.

cat -vte output to us would show us if there were, say, carriage returns for line feeds. Paste in some windows input and some cat -vte output.

I did try

1.  saving the file in unicode txt document
2.  copy the file to vi 
3.  using cat -vte 

and none helped , the problem is that i have to get the o/p from the file and sort it and then put it into different file but since this file has several dozen columns its not opening properly in vi , cat as it opens in wordpad or txtpad.

you can try doing a dos2unix on your file

oh i forgot to mention that .. i tried that one too along with above said things :smiley:

Well, cat -vte helps me, not you, when I see the output.

You can create your data with end of row markers in it (eg, "QqZzEOR") and process it into lines.