Skip to content

Instantly share code, notes, and snippets.

@jana007
Created July 27, 2016 15:48
Show Gist options
  • Save jana007/d361e7c5c8de4ad2456e129fe9e7bb3c to your computer and use it in GitHub Desktop.
Save jana007/d361e7c5c8de4ad2456e129fe9e7bb3c to your computer and use it in GitHub Desktop.
#!/bin/bash
#Jana McKinnon
#COP3353
#assignment 4
#11/30/2015
badFiles=$(find * -maxdepth 0 -type f -readable -writable ! -executable -exec echo "possible bad Poetry:" {} \;)
badCount=$(find * -maxdepth 0 -type f -readable -writable ! -executable | wc -l)
dirCount=$(ls -lht | grep ^- | wc -l)
dirList=$(ls -lhtp | grep -v '/$')
echo "$badFiles"
echo "Number of possible bad poetry files in current directory: $badCount"
echo "Number of files in current directory : $dirCount"
echo "list of files in this directory by modification time (newest first): $dirList"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment