summaryrefslogtreecommitdiff
path: root/bin/find-unused-defines.awk
blob: 2649e41d05346130bb97502fbfd6975e3f8c8ad9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
{
    x++
    y=$0
}

END { 
    tmp = substr(y, 0, index(y, ":"))
    if (x==1) print "sed -i '/[[:space:]]" p1 "[[:space:]]/d' " tmp
}




# | xargs -P 4 -Ixxx sh -c "git grep -w 'xxx' | awk '{ x++; y=\$0 } END { if (x==1) print y }' && echo \"xxx\" 1>&2"

# 	sed -i '' '/pattern/d'
# | awk  'arr[$0]++ END { for (i in arr) { if(arr[i]==1) print i } }' \
# | awk -f find-unused-defines.awk