Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

executable file 13 lines (7 sloc) 0.208 kB
#!/bin/bash
domain=$1
root=`echo $domain | sed -r "s/(.+)\.(.+)\.([^\.]+)$/\2.\3/g"`
if [ $root == "org.uk" ]; then
root=`echo $domain | sed -r "s/(.+)\.(.+)\.(.+)\.([^\.]+)$/\2.\3.\4/g"`
fi
echo $root
Jump to Line
Something went wrong with that request. Please try again.