shithub: bin.rc

ref: 32dae5e4a11c5d7876ce45d221930f84d37e83e2
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