|
Answer» Hi folks,
I'll be grateful for any suggestions as it appears that there are no built in OPTIONS in Windows that I can use. I wish to copy file_1, from the first line CONTAINING a particular string (which can vary from run to run), to file_2, using only batch file command line input.
e.g. 1 transcribe file_1 file_2 ---- PC/STRING/ (position to first line containing STRING) TE (transcribe to end of file) E (end transcription) ++++
e.g. 2 transcribe file_1 file_2 file_3 (where file_3 contains commands equivalent to those between ---- and ++++ above)
I have no problems with installing additional software so LONG as it works.
Many thanks,
John
P.S. Those familiar with ICL George, TME or VME will immediately recognise the above. Quote from: JohnHag on April 24, 2013, 08:32:22 PM Hi folks,
I'll be grateful for any suggestions as it appears that there are no built in options in Windows that I can use.
What you say SOUNDS like an old thread on another forum. http://stackoverflow.com/questions/3644238/split-text-file-in-two-using-bash-script
You can use either AWK or SED for windows. Microsoft has not offered any Windows versions of these because the versions available for windows work fine.
OR Use the Power Shell work-alike: http://windows-powershell-scripts.blogspot.com/2009/06/awk-equivalent-in-windows-powershell.html
That should be enough to get you going.
|