Advertisement
Guest User

Untitled

a guest
Mar 9th, 2020
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. if [ "$#" -ne 1 ]
  4. then
  5. echo You must input path as first argument. Print '?' for more information.
  6. else
  7. if [ "$1" == '?' ]
  8. then
  9. echo Recursive output unique extensions and their count. You must input path as first argument; example var27 /home/dir .
  10. else
  11. find $1 -type f | grep -o '\.[^.]\+$' | sort | uniq -c
  12. fi
  13.  
  14. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement