Read Unix file with Powerbasic 6.0

How can I read LINUX/UNIX text file who has only Linefeed (LF) as terminator not Linefeed/Carriage return (CRLF) as Powerbasic uses ?

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

refer this,

hope it help you..:-)
Um, that's C++ not Powerbasic.

If you want to open the file using Powerbasic, just open it as a BINARY instead of a READ file.
Then you can read in the file one character at a time and when you get to a character with a value of 13, that's the LF character.
soffcecManagerAuthor Commented:
I am reading files who are more than 1 Gb. in size with few millions records. I think open and read as binary  will take to long time. Today I read the whole file and replace LF with CRLF with "REPLACE $LF with   $CRLF"   and then I write it out again, then after I can read it in record for record. I am looking for more simple way to do this.
There is no way to open sequential LF delimited files in PowerBasic. If you use C++ (getline) or VisualBasic (readline), then you can have it read up to LF not just CRLF.
If you must use PowerBasic, then your only option is to read it in as binary and find the LF characters (which are 10, not 13, my mistake. CR is 13, LF is 10). Or of course to modify the Input file as you have done.

Unfortunately, Powerbasic is fairly limited so those are your only options. To summarize, your options are:
Use a different language
Open in binary
Modify input file

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
I don't think reading as binary is any slower. In either case you or the background code needs to find the line terminating character. If the compiler optimizes properly, they should run at the same speed (just take some extra work programming).
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.