shithub: scripts

ref: 3519f1d58ff78407227adb5a3a202d7a4e626a93
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'