Advertisement
Guest User

Untitled

a guest
Nov 5th, 2017
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Awk 0.23 KB | None | 0 0
  1. #!/usr/bin/awk -f
  2.  
  3. BEGIN {FS=":"}
  4. /^ChannelInformation/ { found = 1; j++; printf j ","; next}
  5. found == 1 { for (i=2;i<=NF;i++) { gsub(/^[ \t]+/,"",$i); printf $i }; printf "," }
  6. /^s*$/ && found == 1 { printf "\n"; found = 0 }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement