TF-Scripts/FreeOP Servers/gettemplates.sh

16 lines
249 B
Bash
Raw Permalink Normal View History

#!
declare -a dirs
i=1
for d in /home/tfserver/template/*/
do
d=${d#"/home/tfserver/template/"}
dirs[i++]="${d%/}"
done
echo "There are ${#dirs[@]} templates to chose from"
for((i=1;i<=${#dirs[@]};i++))
do
echo $i")" "${dirs[i]}"
done