shithub: 9intro

ref: a351bcdccdf5a4273bc8dc3360a48fbb8b8aa9ea
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
}