/ Published in: Bash
URL: http://snipplr.com/users/priyanhere/
Expand |
Embed | Plain Text
F_CNT=0 D_CNT=0 for FILE in *; do test -f "$FILE" && F_CNT=`expr $F_CNT + 1` test -d "$FILE" && D_CNT=`expr $D_CNT + 1` done echo "$F_CNT files & $D_CNT dirs in current directory."
You need to login to post a comment.
