-
-
Save telmotrooper/852a72b3afebe5f982fc2951daf4cd47 to your computer and use it in GitHub Desktop.
ls separated by extensions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/bash | |
extensions=$(ls -l | awk '{print $9}' | cut -f 2-99 -d '.' | uniq) | |
for ext in $extensions | |
do | |
echo "-- $ext --" | |
ls -l | grep ".$ext" | awk '{print $9,$5}' | column -t -s " " | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment