Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- BEGIN {
- FS = ":";
- }
- /"itemid"/ {itemid = gensub(/\s*\"(.+)\"(: )\"(.+)\"(\,)/,"\\1\\2\\3\\4","g")}
- /"hostid"/{hostid = gensub(/\s+\"(.+)\"(: )\"(.+)\"(\,)/,"\\1\\2\\3\\4","g")}
- /"name"/ {itemname = gensub(/\s*\"(.+)\"\,/,"\\1","g",$2); printf "%s\n", itemid hostid itemname}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement