Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

split single file into several smaller files

eNG1Ne
2013-12-17
2013-12-19
  • eNG1Ne
    eNG1Ne
    2013-12-17

    OK, searching the forum turned up answers to questions I wasn't looking for ... so here's a new one. I have a single long file of MML tagged text, which I now need to break up into several smaller files. Each unique chunk starts with <Include "styldef.mml"="">. Is there an easy way to do this?

    By "easy" I mean something where I won't have to fire up cygwin and learn new skills :-} not that I don't want to, but this is a task I need to achieve pretty quickly before I'll have the time to learn how to do it better next time.

     
  • Loreia2
    Loreia2
    2013-12-17

    Hi,
    can you post a small sample of text before and after editing?

    BR,
    Loreia

     
  • eNG1Ne
    eNG1Ne
    2013-12-19

    Thanks, Loreia – but in the meantime I had a sudden inspiration and took a better look at cygwin: I'd been afraid I'd need a crash-course in sed or awk, but the csplit command did just what I needed.

    [ps] don't know what happened to my original post showing the start string … never mind