Need help to get the output mail body in rows and columns sequence

Hi Guys,

Can anyone help me out for getting the output mail body rows & columns in sequence expression…

current output:

##Server State Health

AdminServer RUNNING HEALTH_OK,

UCM_server11 RUNNING HEALTH_OK,

UCM_server21 RUNNING HEALTH_OK,

WC_CustomPortal11 RUNNING HEALTH_OK,

WC_CustomPortal21 RUNNING HEALTH_OK,

Current expression :

head -50 /u01/app/oracle/scripts/Health_check/serverState_file | grep ‘##’ | awk -F’:’ ‘{printf("%-25s\t %-15s\t %-20s\n",$1,$2,$3)}’ | head -1 >> $LOG_FILE

tail -n 200 /u01/app/oracle/scripts/Health_check/serverState_file | grep ‘#’ | egrep -v ‘##|#!’ | awk -F’:’ ‘{printf("%-25s\t %-15s\t %-20s\n",$1,$2,$3)}’ >> $LOG_FILE

Required Output:

##Server State Health

AdminServer RUNNING HEALTH_OK,

UCM_server11 RUNNING HEALTH_OK,

UCM_server21 RUNNING HEALTH_OK,

WC_CustomPortal11 RUNNING HEALTH_OK,

WC_CustomPortal21 RUNNING HEALTH_OK,


Linux sysadmin blog - Linux/Unix Howtos and Tutorials - Linux bash shell scripting wiki