Skip to content

Instantly share code, notes, and snippets.

@aesophor
Created July 19, 2022 02:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aesophor/d4ff0ab2d5606e47c88081085a92a27c to your computer and use it in GitHub Desktop.
Save aesophor/d4ff0ab2d5606e47c88081085a92a27c to your computer and use it in GitHub Desktop.
Generate n dummy files in testdir.
#!/usr/bin/env bash
if [ $# -lt 1 ]; then
echo "usage: $0 <nr_test_files>"
exit 0
fi
rm -rf testdir
mkdir -p testdir
for i in $(eval echo {1..$1}); do
touch "testdir/testfile.$i"
done
echo "Generated $1 test files in testdir."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment