I have to pull multiple line records with ^ as the record separator(RS)... # should be my field separator (FS)...
Sample record is:
^-60#ORA-00060: deadlock detected while waiting for resource
ORA-00001: unique constraint (SARADM.TCKNUM_PK) violated#PROC:AVAILABLE_FOR_GETNXTTIC#02/27/2012 03:43:45#^
When I print $0, I get the full record properly:
ads00539:/export/home/vid>cat 123456
^-60#ORA-00060: deadlock detected while waiting for resource
ORA-00001: unique constraint (SARADM.TCKNUM_PK) violated#PROC:AVAILABLE_FOR_GETNXTTIC#02/27/2012 03:43:45#^
ads00539:/export/home/vid>awk 'BEGIN {RS="^"; FS="#";} { print $0}' 123456
-60#ORA-00060: deadlock detected while waiting for resource
ORA-00001: unique constraint (SARADM.TCKNUM_PK) violated#PROC:AVAILABLE_FOR_GETNXTTIC#02/27/2012 03:43:45#
if I set that # to be the FS, my $2 should be
ORA-00060: deadlock detected while waiting for resource
ORA-00001: unique constraint (SARADM.TCKNUM_PK) violated
but it pulls only the first line part as $2... and the second line part, it takes as $3