shithub: bin.rc

ref: 4e18dc77f2ab9257b363ccb480a69cb9def901ba
dir: /bin/clear/

View raw version
#!/bin/rc -e
rfork e
flagfmt = 'a:clearall'; args = ''
eval `{aux/getflags $*} || aux/usage

if(~ $clearall 1)
	>/dev/text && exit
</dev/text sed '/^'^$prompt(1)^'/q' | sed '$d' >/tmp/clear
cat /tmp/clear >/dev/text