forked from decal/werdlists
- Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathparse-header-constants
More file actions
Latest commit
executable file
·27 lines (23 loc) · 706 Bytes
/
Copy pathparse-header-constants
File metadata and controls
executable file
·27 lines (23 loc) · 706 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/usr/bin/env bash
#
# parse-header-constants v1.1
#
# Written By: Derek Callaway [decal (AT) sdf {D0T} org]
# Last Updated: Sat Apr 21 10:03:33 PDT 2018
# Tested On: Ubuntu 16.04.3 LTS
# Darwin 17.5.0 Darwin Kernel Version 17.5.0: Mon Mar 5 22:24:32 PST 2018; root:xnu-4570.51.1~1/RELEASE_X86_64 x86_64 i386
# Use Case: parse-header-constants /usr/include
#
if [ !"$1" ]
thenecho
echo"usage: $0 INCDIR"
echo
echo' INCDIR include directory where header files are to be found'
echo
echo ex. $0 /usr/include
echo
exit 1
fi
find $1 -type f -iname '*.h' -exec egrep '^[#]define ' {} \;| \
awk '{print$2}'| egrep '^[A-Z]+'| grep -v '('| sort -u
exit 0