Hi all,
I have a flatfile
I would like to get ext = 7950 , how do I do that ?
if ($1 == "CTI-ProgramStart") {
ext = substr($9,index($9,"Extension")+11,4);
But why it is not working ???? Please help .
Thanks
Hi all,
I have a flatfile
I would like to get ext = 7950 , how do I do that ?
if ($1 == "CTI-ProgramStart") {
ext = substr($9,index($9,"Extension")+11,4);
But why it is not working ???? Please help .
Thanks
BEGIN {
FS="[|]"
}
$1 == "CTI-ProgramStart" {
if( match($9, /Extention:[0-9][0-9]*/) ) {
str=substr($9, RSTART, RLENGTH)
ext=substr(str, index(str, ":")+1)
print ext
}
}