File:  [Research Unix] / researchv10dc / vol2 / ADM / bm.sh
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:21:34 2018 UTC (8 years, 3 months ago) by root
Branches: belllabs, MAIN
CVS tags: researchv10, HEAD
researchv10 Dan Cross

#!/bin/sh
awk ' BEGIN	{ pat = "^x X PI:[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:[^,]*,[^,]*,[^,]*,"; }
/^x X COORD/	{
	found[$4] = 1
	coord[$4] = $11
	next
}
/^x X PI/	{
	split($3, a, ":")
	off = coord[a[6]]-a[2]
	if(found[a[6]] && off && match($0, pat)){
		pre = substr($0, RSTART, RLENGTH)
		post = substr($0, RSTART+RLENGTH)
		newx = post+off
		sub("^[0-9]*", "" newx, post)
		print "# increasing following xoff by " off
		$0 = pre post
	}
}
	{ print $0 }
'

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.