File: euppertolower.awk

package info (click to toggle)
arpwatch 2.1a15-9
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,984 kB
  • sloc: sh: 3,047; ansic: 2,811; makefile: 90; awk: 90; perl: 15
file content (30 lines) | stat: -rw-r--r-- 351 bytes parent folder | download | duplicates (7)
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
28
29
30
BEGIN {
	x["0"] = "0"
	x["1"] = "1"
	x["2"] = "2"
	x["3"] = "3"
	x["4"] = "4"
	x["5"] = "5"
	x["6"] = "6"
	x["7"] = "7"
	x["8"] = "8"
	x["9"] = "9"
	x["A"] = "a"
	x["B"] = "b"
	x["C"] = "c"
	x["D"] = "d"
	x["E"] = "e"
	x["F"] = "f"

}

{
	s = ""
	for (i = 1; i <= 6; ++i) {
		t = substr($0, i, 1)
		s = s x[t]
	}
	s = s substr($0, 7)
	print s
	next
}