Update vmcreate1.sh
This commit is contained in:
@@ -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 (){
|
||||
|
||||
Reference in New Issue
Block a user