Inital commit
This commit is contained in:
9
Playground/testDetermineType.sh
Normal file
9
Playground/testDetermineType.sh
Normal file
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
ID=100
|
||||
#ID=$1
|
||||
VMS=$(qm list | tail -n+2 | awk '{print $1}')
|
||||
CTS=$(pct list | tail -n+2 | awk '{print $1}')
|
||||
#Determine id type
|
||||
if [[ $VMS =~ $ID ]]; then TYPE=VM; fi
|
||||
if [[ $CTS =~ $ID ]]; then TYPE=CT; fi
|
||||
echo ID is $TYPE
|
||||
Reference in New Issue
Block a user