rewritten script hostinfo.sh