If I do
*.c
it will return a list of files ending with .c, separated by a space. However, I’d like it to instead return a list of files, prefixed with #include " and postfixed with "\n.
e.g. output
#include "blah.c"
#include "meh.c"
#include "hehe.c"
I want to pipe the results of this into gcc -xc - so bonus points if the command is a one-liner.
(And no, I don’t want to just cat *.c because it’ll lose source-location information)
There’s a simpler way: