shithub: bin.rc

ref: 4f4b767fae09a76152d777ca1b5372218d6e5ff9
dir: /bin/ep/

View raw version
#!/bin/rc -e
rfork e
fn usage {>[1=2] echo 'usage:' $usage && exit 'usage'}
usage='ep'

fn salt {dd -if /dev/random -count 1 -quiet 1 | sum | sed 's/ .*//'}

while(~ $1 -* && ! ~ $1 --){
	switch($1){
	case *
		usage
	}
	shift
}
if(~ $1 --)
	shift
if(test $#* -gt 0)
	usage

file = /tmp/ep.`{salt}
col -b >$file
plumb -d edit $file