daily pastebin goal
58%
SHARE
TWEET

Untitled

a guest Jan 23rd, 2012 29 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2.  
  3. yumFile="/var/log/yum.log"
  4. currentDate=`date "+%b %d"`
  5.  
  6. grep "$currentDate" $yumFile > ./tempFile
  7. IFS="/"
  8. for line in `cat ./tempFile`
  9. do
  10.         #echo $line | sed 's/://g' | awk {'print $3 " " $4 " " $5'} | sort
  11.         #echo $line
  12.         occurance=`echo $line | awk {'print $4'} | sed 's/://g'`
  13.         #echo "$occurance"
  14.  
  15.         if [ "$occurance" == "Installed" ]
  16.         then
  17.                 echo $occurance
  18.         fi
  19.  
  20. done
RAW Paste Data
Pastebin PRO WINTER Special!
Get 40% OFF Pastebin PRO accounts!
Top