# Count all lines with sshd[ in them: # The backtic tells the shell to run the command and instead of of # printing the results, substitute that output for the command # inside the `backtics`. echo "There were `grep ' sshd\[' messages.1 | wc -l` sshd entries" # Count only the lines with sshd[ and 'password' in them echo "There were `grep ' sshd\[' messages.1 | grep password | wc -l` Attacks (lines with password in them)" # Count only the lines with sshd[ and 'fail' in them echo "There were `grep ' sshd\[' messages.1 | grep password | wc -l` Attacks (lines with fail in them)"