shithub: bin.rc

ref: c240c428481aa4cd9aadeb95833161b52efc1e96
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