会员
周边
捐助
新闻
博问
闪存
赞助商
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
前端搞什么飞机咯
博客园
首页
新随笔
联系
订阅
管理
2023年2月23日
使用shell判断文件夹中是否包含文件
摘要: #!/bin/bash directory="/path/to/directory" if [ $(ls -A $directory) ]; then echo "有文件" # 执行指定shell脚本 sh /path/to/script.sh else echo "没有文件" fi #!/bin/
阅读全文
posted @ 2023-02-23 16:36 启豪
阅读(440)
评论(0)
推荐(0)
编辑
公告