1 Star 0 Fork 4

谁动了大家的奶酪/AI-Agent-In-Action

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
touch.sh 562 Bytes
一键复制 编辑 原始数据 按行查看 历史
chenguangjian.jk 提交于 2024-10-30 20:04 +08:00 . 1
#!/bin/bash
# 检查是否有参数传入
if [ $# -eq 0 ]; then
echo "使用方法: $0 '文件名1' '文件名2' '文件名3' ..."
exit 1
fi
# 遍历所有参数
for file in "$@"
do
# 检查文件是否已存在
if [ -e "$file" ]; then
echo "警告: 文件 '$file' 已存在,跳过创建。"
else
# 创建文件
touch "$file"
if [ $? -eq 0 ]; then
echo "成功创建文件: $file"
else
echo "错误: 无法创建文件 '$file'"
fi
fi
done
echo "操作完成。"
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/VicsonFP/AI-Agent-In-Action.git
git@gitee.com:VicsonFP/AI-Agent-In-Action.git
VicsonFP
AI-Agent-In-Action
AI-Agent-In-Action
main

搜索帮助