Update vmcreate1.sh

This commit is contained in:
2025-10-24 13:07:44 +00:00
parent 7da5076238
commit 7e564db9fa

View File

@@ -11,12 +11,13 @@ show_help()
echo "In this case Hostname will be inherited from 2 last IP octets. Example for 10.10.35.20: 'vm035020'."
make_file (){
touch hosts.tmp
if [ $# -eq 0 ] then
do touch hosts.tmp
for arg in "$@"; do
ipcheck "$arg"
if [ $? -eq 0 ] then
echo -n "$arg " >> ./hosts.tmp
echo $arg | cut -d '.' -f 3,4 | sed 's/\.//'
echo $arg | cut -d '.' -f 3,4 | sed 's/\.//' >> hosts.tmp
}
ip_check (){