Skip to content

Instantly share code, notes, and snippets.

@Tuebel
Created December 17, 2020 09:44
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save Tuebel/fd09c3c0f85c08bf417eecace16aecf3 to your computer and use it in GitHub Desktop.
Save Tuebel/fd09c3c0f85c08bf417eecace16aecf3 to your computer and use it in GitHub Desktop.
printf '[' > compile_commands.json
find ./build -type f -name 'compile_commands.json' -exec sh -c "cat {} | tail -n+2 | head -n-1 && printf ','" >> compile_commands.json \;
sed -i '$s/.$//' compile_commands.json
printf '\n]\n' >> compile_commands.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment