henesyinit from p9fd787fda5 years agoHistory
38 lines · 501 B · Text
RawDownload
#!/bin/rc awk 'BEGIN{		collect = isdev = 0;} /^$/{		next;}/^#/{		next;}collect && /^[^	\t]/{		collect = isdev = 0;}collect && $0 ~ /[^ \t]+/{		if(isdev)			obj["dev" $1 "'.$O'"]++;		else			obj[$1 "'.$O'"]++;		for(i = 2; i <= NF; i++){			if($i !~ "[+=-].*")				obj[$i "'.$O'"]++;		}}$0 ~ /^[^ \t]/{		if($1 ~ "dev"){			isdev = 1;			collect = 1;		}		else if($1 ~ "misc" || $1 ~ "link" || $1 ~ "ip")			collect = 1;		next} END{		for(i in obj)			x = x i "\n"		printf x}' $*

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t