Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Get all unique includes from the project in the current directory
- function project-includes()
- {
- IFS=$'\n';
- CURDIR=`pwd`;
- for e in `find $CURDIR -name "*.c" -print`;
- do
- grep -iEo "#[ ]{0,}include [\<\"][A-Za-z0-9\.\-\\/\\\]{1,}\.h[\>\"]" $e;
- done | tr -d ' ' | sort | uniq | grep -v "\"" | grep -iEo "[\<].*[\>]" | tr -d '<' | tr -d '>'
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement