Say you have 100s of source files (.c or .cpp) files, and you want to include some definitions, function/variable declarations in each of them. Normally in C/C++, you use he
Yes, it would be tiresome. This is why you uses the shell...
The following mystical incantation will do exactly what you ask in a few keystrokes!
find ./ -name "*.c" -or -name "*.cpp" | xargs -n 1 sed -i '1 i #include '
Bow down to the mighty power of unix, heathens...