while read p || [[ -n $p ]]; do
host ${p} >> result.txt
done < hosts.txt
exec 4< /dev/com1
cat <&4
exec 4<&-
string=${string//[^0-9A-Za-z\xDO\x90-\xd0\xbf\xd1\x80-\xd1\x8f\xd0\x81\xd1\x91]/_};
ls | grep -v dir2 | xargs rm -rfv