I want to make a script that scans source files, and add a string to header lines such as from #include “abcd.h” to #include “dir/abcd.h”. It doesn’t matter what header file it is, just anything after #include. Anybody have any idea how to do it with unix commands or I should write a script?
Share
The following bash script will do it: