Using C for string search etc

Discussion in 'C Programming' started by brian, Apr 8, 2004.

  1. brian

    brian Guest

    I have a set of huge files on which I am doing some typical search and
    replace operations, with the help of sed/awk scripts.

    However for various reasons I have to write C programs instead of
    sed/awk scripts. If someone has experience with C programming with
    string searches, replace etc please let me know, web links, pointers
    etc.
     
    brian, Apr 8, 2004
    #1
    1. Advertising

  2. brian <> spoke thus:

    > However for various reasons I have to write C programs instead of
    > sed/awk scripts. If someone has experience with C programming with
    > string searches, replace etc please let me know, web links, pointers
    > etc.


    The functions declared in <string.h> are useful for searching strings
    - consult your friendly documentation for more details.

    --
    Christopher Benson-Manica | I *should* know what I'm talking about - if I
    ataru(at)cyberspace.org | don't, I need to know. Flames welcome.
     
    Christopher Benson-Manica, Apr 8, 2004
    #2
    1. Advertising

  3. brian

    Dan Pop Guest

    In <c52db8$hd8$> Christopher Benson-Manica <> writes:

    >brian <> spoke thus:
    >
    >> However for various reasons I have to write C programs instead of
    >> sed/awk scripts. If someone has experience with C programming with
    >> string searches, replace etc please let me know, web links, pointers
    >> etc.

    >
    >The functions declared in <string.h> are useful for searching strings
    >- consult your friendly documentation for more details.


    They are useless when the target string is specified as a regular
    expression.

    Dan
    --
    Dan Pop
    DESY Zeuthen, RZ group
    Email:
     
    Dan Pop, Apr 8, 2004
    #3
  4. brian

    Joe Wright Guest

    brian wrote:
    > I have a set of huge files on which I am doing some typical search and
    > replace operations, with the help of sed/awk scripts.
    >
    > However for various reasons I have to write C programs instead of
    > sed/awk scripts. If someone has experience with C programming with
    > string searches, replace etc please let me know, web links, pointers
    > etc.


    Hi Brian. This is a little vague. If sed/awk works, what might be some
    of the various reasons you must write a new program from scratch? Might
    perl be better than sed/awk for your purposes?

    --
    Joe Wright mailto:
    "Everything should be made as simple as possible, but not simpler."
    --- Albert Einstein ---
     
    Joe Wright, Apr 9, 2004
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Robin Cull
    Replies:
    5
    Views:
    407
    Andrew Dalke
    Jul 31, 2003
  2. Daniel Joyce

    Python Audio (Alpy, Fastaudio, Etc Etc)

    Daniel Joyce, Sep 16, 2003, in forum: Python
    Replies:
    1
    Views:
    925
    Markus Wankus
    Sep 16, 2003
  3. Marco Herrn
    Replies:
    7
    Views:
    630
    Ng Pheng Siong
    Apr 9, 2004
  4. Kevin Walzer

    Re: PIL (etc etc etc) on OS X

    Kevin Walzer, Aug 1, 2008, in forum: Python
    Replies:
    4
    Views:
    412
    Fredrik Lundh
    Aug 13, 2008
  5. Abby Lee
    Replies:
    5
    Views:
    421
    Abby Lee
    Aug 2, 2004
Loading...

Share This Page