shithub: 9intro

ref: 2b99422480d596ebc26921c87c6bb81a07949f3e
dir: /slant/

View raw version
#!/bin/rc
rfork e
ifs='
'
pstate=pass
slant='\S''15'''
unslant='\S''0'''

smark=';'
while (line=`{read}) {
	if (~ $line [\.]P1*) {
		pstate=do
	}

	if (~ $line [\.]P2*) {
		pstate=pass
	}
	
	if (~ $pstate do) {
		if (~ $line $smark^* ) {
			line=`{echo $line | sed s/$smark//}
			if (~ $#line 0) echo $smark
			if not echo $smark^$slant^$line^$unslant
		}
		if not echo $line
	}
	if not echo $line
}