File: e.awk

package info (click to toggle)
arpwatch 2.1a4-3
  • links: PTS
  • area: main
  • in suites: potato
  • size: 572 kB
  • ctags: 233
  • sloc: ansic: 2,467; sh: 1,723; makefile: 140; awk: 61
file content (16 lines) | stat: -rw-r--r-- 219 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# Add -old suffix to ethers file, as required. Assumed sorted input

{
	if (!seen[$2]) {
		seen[$2] = 1
		print
		next
	}
	h = $2 "-old"
	s = h
	for (n = 1; seen[h]; ++n)
		h = s n
	seen[h] = 1
	print $1 "\t" h
	next
}