plan9fox/rc/bin/delkey

13 lines
254 B
Text
Raw Normal View History

#!/bin/rc
rfork e
ctl = /mnt/factotum/ctl
if(test -r /mnt/term/mnt/factotum/ctl)
ctl = /mnt/term/mnt/factotum/ctl
ifs='
'
2015-10-30 21:18:09 +00:00
sed 's/ ![0-9a-zA-Z_]+\??/ /g; s/''/''''/g; s/ +$//' $ctl | awk -v 'ctl='^$ctl ' { printf "echo ''del%s'' > %s\n", $0, ctl } '