reinc include files using RegExp Usage reinc -P '(?m)^@(.+?)@\n' -o out.txt in.txt or reinc -P '(?m)^@(.+?)@\n' - <in.txt >out.txt Input file (in.txt) --- @parts/index.txt@ --- Included file (parts/index.txt) @hello.txt@ Included file (parts/hello.txt) Hello, world! Output file (out.txt) --- Hello, world! --- License Apache License 2.0