defining a variable inside one file whose value is output of grep of pattern in another file

Viewed 40

I've a word abcxxxxdef in file1 which could be grepped/searched as "abc.*def". I want to use a variable in file2.c which will search for "abc.*def" in file1 and take the value of abcxxxxdef. The actual word can change in file1 but will always satisfy the pattern "abc.*def" and the variable to be used in file2.c should take the appropriate value during each compilation.

Thanks,

0 Answers
Related