-2
void main()
{
char comando[2000];
char resultado[500]
sprintf(comando, "grep '[0-9]{50}-' input.txt);
resultado = system(comando);
printf("%s\n",resultado);
}
I only need 1 match, and return the value as a result, the above code does not compile, it’s just an example of how I’d like it to look.
It’s just an example of how I’d like it to work, what I can’t get is the return of the grep command, until the sprintf part I think is correct
– Gilberto Sudario
You should provide a functional example that reproduces the problem. https://answall.com/help/mcve
– Gabriel
I’m sorry Gabriel, but if it was functional I wouldn’t be asking. I made a prototype of how I’d like it to be, to try to explain the problem. I cannot get a result of the system() flame if there is another way or other to do this would be very grateful.
– Gilberto Sudario