Hi ,
I am having an issue with the Awk script to insert newline for a regular expression match
Having a file like this
FILE1
####################
RXOER , RXERA , RXERC , RXERD
.RXEA(RXBSN), RXERD , REXCD
input RXEGT
buffer RXETRY
#######################
Want to match the RXE Regular expression in the FILE1 and insert a new line after the expression but with some conditions as shown in output
Output should be like this
######################
RXOER,
RXERA ,
RXERC ,
RXERD
.RXEA(RXBSN)
RXERD ,
REXCD
input RXEGT
buffer RXETRY
###########################
I am trying this script like this
awk '{gsub(/RXE/,"RXE\n"}' FILE1
but not getting the output as shown in the output file
Tried to Split it also but could not able to work with Split command of Awk
Please help me out
Thanks
Jaita