命令行执行(加 * 或 ? 号)
for /r C:/ %i in (curl*.exe) do @echo %i
for /r C:/ %i in (curl?.exe) do @echo %i
示例

请求URL

脚本授权
for /L %%i in (1,1,3) do mysql -uroot -e "grant select on njdb.zs to 'b%%i'@'localhost' identified by '123456'"

本文介绍了使用命令行进行文件搜索及数据库权限分配的方法。通过示例展示了如何利用 for 命令结合通配符查找指定目录下的文件,并演示了如何通过循环为 MySQL 数据库的不同用户授权。
for /r C:/ %i in (curl*.exe) do @echo %i
for /r C:/ %i in (curl?.exe) do @echo %i


for /L %%i in (1,1,3) do mysql -uroot -e "grant select on njdb.zs to 'b%%i'@'localhost' identified by '123456'"

1107

被折叠的 条评论
为什么被折叠?