1. Reference: Running .sh or Shell script files using WSL in Windows 10. Because running a .sh file requires all environment configurations within the file to depend on the configuration items in Ubuntu. However, the environment configuration in Ubuntu is incomplete. I ultimately decided to replace the Shell script with a PHP script.
2. The code implementation of the Shell script is as follows:
Bash
#!/bin/sh
for i in $(seq 1 200);
do
echo "Install theme $i times"
php artisan theme-store-db:theme:install C:/Users/Lenovo/Downloads/theme "theme$i" blade --force
done
3. The current requirement is to execute the PHP command line within a PHP script.
4. Execute the command: php themes.php. The execution succeeded. See Figure 1.

Plaintext
PS E:\wwwroot\object> php themes.php
Install theme 1 times
Install theme 2 times
Install theme 3 times
Install theme 4 times
Install theme 5 times
5. Verify the execution result by checking the data written to the database; it meets expectations. See Figure 2.

