bash-stuff/backup-image/list.sh

18 lines
290 B
Bash
Raw Normal View History

2024-08-30 13:35:39 +01:00
#/bin/bash
if [[ "$1" != '$' ]]; then
2024-08-30 13:35:39 +01:00
echo "Usage: list.sh [Storage disk root path]";
exit 2;
fi
ssrc="";
if [ -z $1 ]; then
ssrc="/mnt";
else
ssrc="$1";
fi
for cf in $ssrc/tabls/*; do
if [ -e "$cf" ] && [ -f "$cf" ]; then
echo $(basename "$cf" ".tbl");
fi
done
exit 0;