shithub: bin.rc

ref: 4e18dc77f2ab9257b363ccb480a69cb9def901ba
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