shell脚本之判断文件类型
- 原码如下:
#!/bin/bash
#check that the files exists.
addr=/home/hadoop/test.txt
if [ -d $addr ]
then echo $addr is a directory
elif [ -e $addr ]
then echo $addr is a file
fi
#!/bin/bash
#check that the files exists.
addr=/home/hadoop/test.txt
if [ -d $addr ]
then echo $addr is a directory
elif [ -e $addr ]
then echo $addr is a file
fi
上一篇:Scala退出shell窗口
下一篇:Shell脚本中实现循环的方式
手写一个拖拽文件功能
#!/bin/sh #先判断参数 参数要3个以上 # we have less than 3 arguments.&n
简易 rename 文件夹app
本程序要解决的需求是这样的:比如有T] dir s...
举报文章
请选择举报类型
补充说明
0/200
上传截图
格式支持JPEG/PNG/JPG,图片不超过1.9M