test
#!/bin/bash
# Define your function
update_vm_memory() {
local host="$1"
local vm="$2"
# Your function logic here
echo "Updating VM $vm on host $host"
# ... rest of your function code ...
}
# Main script
host="example-host"
vm="example-vm"
# Call the function with two variables in background
update_vm_memory "$host" "$vm" &
# Alternative: you can pass values directly
# update_vm_memory "host1" "vm1" &
# Continue with other operations
echo "Main script continues while function runs in background"
# Wait for all background processes to complete if needed
wait
echo "All background processes completed"
Comments
Post a Comment