Hi, Can you please help me....I have that command awk '/Event/{cnt++}END{print cnt,"MBLR", $YESTERDAY}' ME_MBLR_$YESTERDAY* > counter.txt that writes in counter.txt and the result is: 1234 MBLR how can I add one more column with the yesterday date? And result to be: 1234 MOBILEROAM 20101016 where $YESTERDAY=20101016 Thanks in advance!! Atanas
Solved Suppose you below result is in variable ABC. 1234 MBLR You can modify it as below Code: echo $ABC | sed 's/MBLR/MOBILEROAM/' | sed 's/.*/& '`date -dyesterday | awk '{print $6"-"$2"-"$3}'`'/' I have tested this in RHEL machine. Also, always use commands, scripts, e.t.c in CODE Tags while posting.