The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 06-24-2008
skully skully is offline
Registered User
  
 

Join Date: Apr 2008
Posts: 46
yesterday date month/date

Hi expert,

I want to retrieve yesterday su log.
How to calculate and assign variable value ( 06/23 ) in myVariable ?


#!/bin/sh

myVariable=yesterday date in month/date

cat /var/adm/sulog | grep $myVariable > file.txt



many thanks!