PHP
·
发表于 5年以前
·
阅读量:8296
#!/bin/bash
# count number of files in your PATH
mypath=`echo $PATH | sed 's/:/ /g'`
count=0
for directory in $mypath
do
check=`ls $directory`
echo $check
for item in $check
do
count=$[ $count + 1 ]
done
echo "$directory - $count"
count=0
done