Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- if [ "$#" -ne 1 ]
- then
- echo You must input path as first argument. Print '?' for more information.
- else
- if [ "$1" == '?' ]
- then
- echo Recursive output unique extensions and their count. You must input path as first argument; example var27 /home/dir .
- else
- find $1 -type f | grep -o '\.[^.]\+$' | sort | uniq -c
- fi
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement