summaryrefslogtreecommitdiff
path: root/linux/ioctlent-filter.awk
blob: 181c4bf709b77fe8cec15baca0793935fc1df2ee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/awk -f
# Filter out redundant "*32" symbols.

BEGIN {
	s=""
	c=""
}

NF == 3 && $2 ~ /^"[^",]*",$/ {
	if ($2 == s && $3 == c)
		next
	s = $2
	sub(/",$/, "32\",", s)
	c = $3
}

{
	print
}