File: wzip

package info (click to toggle)
hspell 1.4-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 1,556 kB
  • sloc: ansic: 2,808; perl: 1,989; makefile: 209; sh: 109; awk: 15
file content (17 lines) | stat: -rwxr-xr-x 254 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/awk -f

NR == 1 {
	last=$1
	printf("%s",$1)
	next
}
{
	for(i=1;i<=length(last);i++){
		if(substr(last,1,i)!=substr($1,1,i)){
			break;
		}
	}
	back=length(last)-i+1;
	printf("%d%s",back,substr($1,i));   # decimal digits, for now...
	last=$1
}