alhassani54
Programmer
I have a variable as rec. rec will contain one or many of UNB possibly
rec=UNB123456789UNB2234567890UNB32345UNB4234567UNB52
I would like to change it to
rec1=UNB123456789
rec2=UNB2234567890
rec3=UNB32345
rec4=UNB4234567
rec5=UNB52
Tried to use regular expression but I could not get it right.
rec1=${rec%UNB*}
print $rec1
UNB123456789UNB2234567890UNB32345UNB4234567
I would like to use unix regular expresion.
Thanks
rec=UNB123456789UNB2234567890UNB32345UNB4234567UNB52
I would like to change it to
rec1=UNB123456789
rec2=UNB2234567890
rec3=UNB32345
rec4=UNB4234567
rec5=UNB52
Tried to use regular expression but I could not get it right.
rec1=${rec%UNB*}
print $rec1
UNB123456789UNB2234567890UNB32345UNB4234567
I would like to use unix regular expresion.
Thanks