⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 filetype.sh

📁 Solaris环境下Shell编程编程
💻 SH
字号:
#!/bin/sh # Purpose: This file will determine is the pathname passed on #          the command line is a file or directory. Then it will#          print information about the pathname.## Scriptname: filetype.shif [ $# -ne 1 ]; then	echo "Usage: filetype pathname"	exit 1fiif [ -d $1 ]; then	echo "$1 is a directory."	echo "Following is a listing of the $1 directory."	ls $1	echo " "	echo "The number of kilobytes used by directory $1 is: \c"	du -s -k $1 | nawk '{print $1}'else	echo "$1 is a file."	echo "The size of $1 in bytes is: \c"	ls -l $1 | nawk '{print $5}'	echo	if [ -b $1 ]; then		echo "$1 is s block special file."	elif  [ -c $1 ]; then		echo "$1 is s character special file."	elif  [ -u $1 ]; then		echo "$1 has the set-user-id permission."	else		echo "There is nothing sepecial to say about file $1."	fifiecho "Finished"

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -