shithub: sm2

ref: 880935ee5b815a32348d16bb6d781935ff28c630
dir: /bin/sm2geradd/

View raw version
#!/bin/rc
awk -F'	+' -v 'p=/usr/qwx/p/sm2/ger' -v 'dict=/usr/qwx/p/sm2/ger/db' '
$1 == ""{
	print "\n" $0 >>last
	close(last)
}
$1 != ""{
	f=$1
	gsub(" ", ".", f)
	last=p "/" f ".t"
	if(system("test -f " last) == 0)
		print f ": appending to existing file"
	else
		print "2.5 0 0 0 " f ".pdf" >>dict
	printf "%s\n.BP\n%s\n\n%s\n", $1, $1, $2 >>last
	close(last)
}
' $*