编写一个 Shell 脚本,将指定目录下所有文件名中的小写字母转换为大写字母。

Shell 脚本示例

#!/bin/bash

# 获取指定目录
directory=/path/to/directory

# 转换文件名为大写
for file in $directory/*
  do
    mv "$file" "${file^^}"
  done