Need help..not sure how to use with awk or sed
I want to take data from the notification.$$ file and assign the data to variable "group". Not sure how to do it.
The data I want to extract from the notification.$$ is on the first line of the file ..right after the (notice):
NetWorker savegroup: (notice) EGL completed,
1 # This script sends email that save group completed.
2 #!/bin/sh
3 group=" "
4 dat=`date +"%c"`
5 log='/nsr/logs/test_savegrp.log'
6 echo "\n -- BUR Legato $dat Test Save Group Notification -- \n" >> $log
7 tee notification.$$ >> $log
8 group=`grep -l notice
9 echo " -- $dat end of $group Savegroup Message --\n" >> $log
10 awk "
11 /usr/ucb/mail -s "$dat $group-BUR Networker Savegroup Completion Report" xxx.email < notification.$$ >>
$log 2>&1
~
~