判断文件是不是shell script
时间:2007-06-12 来源:zhaoyangcom
cat /root/shell.sh
#!/bin/bash
if file kill.sh | grep -s 'shell script' > /dev/null
then
echo "This is a shell script"
else
echo "This isn't a shell script"
fi
相关阅读 更多 +