Added first script

This commit is contained in:
Oswaldo Zerpa
2020-09-14 11:50:21 -05:00
parent f4e682c185
commit 478191abc1
+12
View File
@@ -0,0 +1,12 @@
#!/bin/zsh
# Determine number of lines
n=$(pve-zsync status | awk 'END { print NR }')
# For every line, run the command pve-zsync enable with their respective parameters
for i in {2..$n..1}
do
SOURCE=$(pve-zsync status | awk 'NR == '$i' {print $1}')
NAME=$(pve-zsync status | awk 'NR == '$i' {print $2}')
pve-zsync enable --source $SOURCE --name $NAME
done