Need help with text files having LF & CRLF | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Need help with text files having LF & CRLF

We get ASCI text files having either a LF or CRLF for a row terminator. Both sets of files are delimited by tabs. We do not know what row terminator we have until we open it up in notepad. I have two DTS packages, one for LF, one for CRLF, but wish to do it as one. When I run the wrong package in XP command shell, it will either give me one row, or hang. We have no C#, VB expertise available to build a custom object.
How about the tool that will remove all CR from input file? I believe grep can do it. You can put execution of tool with appropriate parameters and dts runner running dts package in one cmd file.
Grep! It’s been so long that I cannot remember how to use it, much less where to call it?
Please give me some insight.
The same with me. But there is free download. Use google to find, i don’t remember url anymore. Then run grep /? in command prompt.
Grep was, and still is powerful, unfortunately it is not an option in our microsoft shop. While doing a search on GREP, Regex etc, there aparently is a tool in the server 2000 toolkit that appears to be the same type of thing. Anyone know what this may be?
Actually I think awk tool is one that can help solving the problem. Try: http://cm.bell-labs.com/cm/cs/awkbook/index.html
]]>