Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- echo "nhap thu muc: "
- read dir
- if test -d $dir
- count=0
- then
- for line in $(ls -l $dir | grep -v 'd' | awk '$1 != "total" {print $1}')
- do
- count=$(( $count + 1 ))
- done
- echo "Trong "$dir" co: "$count" thu muc con"
- else
- echo "thu muc khong ton tai"
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement