Skip to content

Commit

Permalink
skip empty lines/comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Matija Nalis committed Jun 23, 2014
1 parent 27e84f6 commit 750e301
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions gp2_to_bin.pl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@


while (<>) {
s/^.*\(0\) //; # remote timestamps etc
s/\s+//g; # no whitespace allowd for pack
next if /^\s*$/; # skip empty lines
next if /^\s*#/; # skip comment lines
s/^.*\(0\) //; # remove timestamps etc
s/#.*$//; # remove comments at the end of line
s/\s+//g; # no whitespace allowd for pack
print pack "H*", $_;
}

0 comments on commit 750e301

Please sign in to comment.