lite-xl/scripts/dmon-test.sh

26 lines
410 B
Bash
Raw Normal View History

2021-07-23 23:14:45 +02:00
#!/bin/bash
IFS=$'\r\n' GLOBIGNORE='*' command eval 'DIRS=($(find . -type d))'
n=${#DIRS[@]}
files=()
for i in {1..20}; do
files[$i]="${DIRS[$(( $RANDOM % $n ))]}/dmon-test-$i.txt"
done
for name in "${files[@]}"; do
echo "create ${name#./}"
touch "${name#./}"
done
echo "Files created"
sleep 2;
for name in "${files[@]}"; do
echo "remove ${name#./}"
rm "${name#./}"
done
echo "Files removed"