petro2
asked on
invisible data in a file from Dos to Unix
I ftp from dos to unix, put from dos. I can see all the data in the dos file on dos side. But when I vi the file on the unix side the last line of data is missing. When I process the file with an import utility the data from the last line is imported.
How can I see the entire data file in Unix? What is causing the data to appear not to be there?
SCO
How can I see the entire data file in Unix? What is causing the data to appear not to be there?
SCO
It could be a terminal setting. If the $TERM variable is set incorrectly, the last line of the screen may show strange data or nothing at all. Try setting $TERM to something standard like vt100 and see if the problem persists.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Do you get a message from vi that looks something like 'Missing newline on last line of file'? If so, that's your problem. It doesn't mean the file is different on Unix and Win*, but merely that vi doesn't display the file properly.
petro
Just wondering ... you accepted my suggestion, but the grade was C only. Any specific reason for that?
======
Werner
Just wondering ... you accepted my suggestion, but the grade was C only. Any specific reason for that?
======
Werner
ASKER
I hoping I would not have to use another utility on this problem, that it could be handled by just changing a parm, or a view that I was doing. Your suggestiong works, but it not the magic bullet I was hoping for. I have been poisoned by thinking that a command like:
cat -parm filename
would give me a view of the file quickly. I am taking this file off the Internet with a windows server, putting on the Unix box for one application coping it and letting an AS400 picked up the file a process it over there. When there is a problem with the file I always look at the unix box 1st to see what the file looks like. So if I can't just pop it open and get an answer then anything I do to the file makes my observation suspect.
Sorry maybe I took my disappointment out on you. Please forgive. I will go home tonight and do a penitence. thanks for your help. Have a nice weekend.
cat -parm filename
would give me a view of the file quickly. I am taking this file off the Internet with a windows server, putting on the Unix box for one application coping it and letting an AS400 picked up the file a process it over there. When there is a problem with the file I always look at the unix box 1st to see what the file looks like. So if I can't just pop it open and get an answer then anything I do to the file makes my observation suspect.
Sorry maybe I took my disappointment out on you. Please forgive. I will go home tonight and do a penitence. thanks for your help. Have a nice weekend.
here's a thought... when you ftp it, make sure you transport in ascii mode... this takes care of the translation of cr/lf and lf for you.
-G
-G