Create halfreg.sh