Guest User

Untitled

a guest
Feb 23rd, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. #!/usr/bin/perl
  2. while(my $line = <>) {
  3. if ($line =~ /profile_([^.]+).xml:[^<]+<usbPid>([0-9]+)/) {
  4. printf("%s: %4x\n", $1, $2);
  5. } else {
  6. print($line);
  7. }
  8. }
  9.  
  10. # Use as:
  11. # grep usbPid *.xml | grep -v demo | perl extract.pl | sed -e "s/_/ /g" -e "s/ a/0a/g" -e "s/ 1/ 01/g" | uniq
Add Comment
Please, Sign In to add comment