Hello,
I need a program that search in a input file a string, when this string is maching i want to copy all lines until a white line, and loop until end off file, example:
"INPUT FILE "
dn:radiuslist=reply,radiusname=thia2000@arrakis.net,radiusclass=Native-User,o=
radius
changetype: add
objectclass: top
objectclass: reply
radiuslist: reply
framed-ip-address: [pool] GSMBOX.ES
framed-ip-netmask: 255.255.255.255
primary-dns-server: 212.59.199.2
secondary-dns-server: 212.59.199.6
dn: radiusname=francesco.zanieri@jumpy,radiusclass=Native-User,o=radius
changetype: add
objectclass: top
objectclass: Native-User
objectclass: user
radiusname: zanieri@jumpy
password: {x-clear}tegamino
login-limit: 1
dn: radiuslist=check,radiusname=francesco.zanieri@jumpy,radiusclass=Native-User,o=radius
changetype: add
objectclass: top
objectclass: check
I want that the program search the string "jumpy" and copy all record to output file until a white line in all file.
I make this program but whent found the first string the condition is broken:
{
if (/jumpy/) {
do {
print
getline
} while ($1 != /- / || $1 != RS)
if (/EOF/) {print}
} else next
}
Can anyboy help me
I need a program that search in a input file a string, when this string is maching i want to copy all lines until a white line, and loop until end off file, example:
"INPUT FILE "
dn:radiuslist=reply,radiusname=thia2000@arrakis.net,radiusclass=Native-User,o=
radius
changetype: add
objectclass: top
objectclass: reply
radiuslist: reply
framed-ip-address: [pool] GSMBOX.ES
framed-ip-netmask: 255.255.255.255
primary-dns-server: 212.59.199.2
secondary-dns-server: 212.59.199.6
dn: radiusname=francesco.zanieri@jumpy,radiusclass=Native-User,o=radius
changetype: add
objectclass: top
objectclass: Native-User
objectclass: user
radiusname: zanieri@jumpy
password: {x-clear}tegamino
login-limit: 1
dn: radiuslist=check,radiusname=francesco.zanieri@jumpy,radiusclass=Native-User,o=radius
changetype: add
objectclass: top
objectclass: check
I want that the program search the string "jumpy" and copy all record to output file until a white line in all file.
I make this program but whent found the first string the condition is broken:
{
if (/jumpy/) {
do {
getline
} while ($1 != /- / || $1 != RS)
if (/EOF/) {print}
} else next
}
Can anyboy help me