my fic is like that :
r04 VIDOPCLI 04 * 0120
r04 VIDOPCVM 04 * 028
aST VIDSTATS ST * 050
r16 HTEBAC16 16 * 0250 30788 16
aHT HTBACS HT * 0120 T 0203
I want to change the last field of the last line which contains /HTBACS/ to the current date `date +%m%y`
i'm a beginner..i have try something like that..but it does'nt work....
####
##
#
datedumois=`date +%m%y`
date_fic=` grep HTBACS fic_htbacs | awk '{print $7}'`
if [[ $date_fic = $datedumois ]]
then
break
else
awk '/HTBACS/ {datedumois='`date +%m%y`' ;
$NF = datedumois ;
print $1"\t\t\t\t\t"$2"\t"$3"\t"$4"\t\t\t"$5,$6,$7 }' fic_htbacs >> fic_htbacs
fi
if u could help me ...
thanks for all
Zak from Paris
r04 VIDOPCLI 04 * 0120
r04 VIDOPCVM 04 * 028
aST VIDSTATS ST * 050
r16 HTEBAC16 16 * 0250 30788 16
aHT HTBACS HT * 0120 T 0203
I want to change the last field of the last line which contains /HTBACS/ to the current date `date +%m%y`
i'm a beginner..i have try something like that..but it does'nt work....
####
##
#
datedumois=`date +%m%y`
date_fic=` grep HTBACS fic_htbacs | awk '{print $7}'`
if [[ $date_fic = $datedumois ]]
then
break
else
awk '/HTBACS/ {datedumois='`date +%m%y`' ;
$NF = datedumois ;
print $1"\t\t\t\t\t"$2"\t"$3"\t"$4"\t\t\t"$5,$6,$7 }' fic_htbacs >> fic_htbacs
fi
if u could help me ...
thanks for all
Zak from Paris