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 -->
  #6 (permalink)  
Old 01-29-2008
smr_rashmy smr_rashmy is offline
Registered User
  
 

Join Date: Sep 2007
Posts: 40
still it did not updated frnd,

$ dt=`date -u +%d-%m-%y`
$
$ echo $dt
29-01-08
$
$ cat tst.txt
Date 12-01-08

$
$ awk -v dat=$dt '{if( $1 ~ /Date/) print $1" "dat;}' tst.txt
Date 29-01-08
$
$
$ cat tst.txt
Date 12-01-08

$