shithub: scripts

ref: bc762e9c9294990c0d2480295637c792363dcc8c
dir: /bin/rc/X2D/

View raw version
#!/bin/rc

hexstr=`{cat '/mnt/acme/'^$winid^'/rdsel' | tr a-z A-Z}
decstr=`{echo 'ibase=16; ' $hexstr | bc}
if(! ~ $decstr *error*)
	echo -n $decstr >'/mnt/acme/'^$winid^'/wrsel'
if not
	exit 'malformed hexadecimal string'