shithub: 9intro

ref: a351bcdccdf5a4273bc8dc3360a48fbb8b8aa9ea
dir: /slope/

View raw version
#!/bin/rc
rfork e

pstate=pass
while (line=`{read}) {
	if (~ $line [\.]P1*) {
		pstate=do
		}
	if (~ $line [\.]P2*) {
		pstate=pass
		}
	if (~ $pstate do) {
		line=`{echo $line | sed -e 's/^; /.CW\\S''15''; /'}
		if (~ $line [\.]CW\S*) {
			echo -n $line
			echo '\S''0'''
			}
		}
	if not echo $line
	}