I'm a noob with pretty terrible programming skills.

I have a text file that reads like this:

(BIG STRING IN PARENTHESES) integer\_value

(BIG STRING IN PARENTHESES) integer\_value

(BIG STRING IN PARENTHESES) integer\_value

(BIG STRING IN PARENTHESES) integer\_value

I have a program that reads a string on stdin and returns a value.

I need some way to pass the string (and only the string) to the program and compare the value it returns with the one in the text file.

I tried to do this with a Bash script but I got really confused and frustrated, so I thought I'd try to do it with C.

```
int main(void)
{
int x;          
FILE *fp;
fp = fopen("vectors.lst", "r");

if (fp == NULL) {
     printf("Failed to open\n");
     exit(0);
  }

    for(i = 1; i<10400; i++){

        //This is where I am confused

            while(fscanf(fp, "%s %d",passedstring,correctvalue) != EOF){

        printf("%s",passedstring);

            }
}
exit(0);
}

```

My problem is: 

I don't know how to iterate through only the strings in the for loop, while still only reading until the end of the file. I'm starting to think using C for this was a terrible idea.

Can anyone offer some advice? I'm still open to using a script if there's an easy way to implement it.