shithub: 9intro

ref: 2b99422480d596ebc26921c87c6bb81a07949f3e
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
	}