Skip to content

Instantly share code, notes, and snippets.

@jana007
Created July 27, 2016 15:48
#!/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