awk 'FS=OFS="/"{m=$1;for(n=$2;p=n%m;m=p)n=m}$(1<$2/=m)/=m'

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page