looking for c function for this

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tvnaidu
    Contributor
    • Oct 2009
    • 365

    #1

    looking for c function for this

    Can I get C function which should return integer value in quotes (here it is 1000), c function should should do below statement.

    Code:
    # tail -n 5 config.txt | grep ROWID | grep eventLog
    eventLog[1000]["_ROWID_"] = "1000"
    #
  • donbock
    Recognized Expert Top Contributor
    • Mar 2008
    • 2427

    #2
    I gather you want your program to write the text on line 3 of your listing to stdout. Sure, C can do this.

    What is the input to your program?
    What is the rule for converting the input into the output?

    Comment

    • tvnaidu
      Contributor
      • Oct 2009
      • 365

      #3
      Thanks. I found an answer. actually I need to extract that 1000 as ROWID, but I found C function which is wrapper for SQL query. appreciated

      Comment

      • tvnaidu
        Contributor
        • Oct 2009
        • 365

        #4
        I need C function, actually I have this config file, after boot it contains some entries, I need to know last ROWID, that is why I am doing grep, I want that number "1000" to return from C function.

        Comment

        Working...