perl
Script to get the number of events from the logs.
2010/04/11
<a id="aptureLink_4P0PJ73NaG" style="margin: 0pt auto; padding: 0px 6px; text-align: center; display: block;" …
log analysis with perl and wireshark decode.
2010/04/11
Here is something that I had to do in couple of hours to check the logs. The problem was the log file was printing the Received and Sent message in the hex format. I had to verify if the messages were …
Bugzilla Automation with perl — add, update or query any bug in Bugzilla using perl and www series modules for perl.
2010/04/11
Today I was trying to do some queries and see if I could create a new bug or update a existing bug in the Bugzilla. The one that I was trying to access was on version 2.0 and not on 3.0. This being …
Extract all urls from the last firefox sessionstore.js file used.
2010/03/29
Some taken from commandlinefu. What all the below commands are doing is basically that the url: is captured from the sessionstore.js file and then just extract the URL from the line. These are done in …
Recursive Regular Expressions
2010/03/24
<img src="http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/yo-dawg-regex.jpg" alt="Yo dawg, I heard you liked regular expressions, so I put a regex in your regex so you can …
Quickly search and replace string with Regular expression in multiple files using perl
2010/01/27
for i in *; do perl -p -w -e ’s/a(.*)b.*/d$1e/g’ $i > temp/$i; done for i in *; do perl -pi -w -e ’s/a(.*)b.*/d$1e/g’ $i ; done […] The first one can …
Perl script to create csv files with a pattern – Generic script.
2010/01/19
I was having a really bad day and needed a quick solution to create some csv files. And this I needed to do for multiple data kinds and patterns, so I created this small script to do the job for me… …
Display the output of a command from the first line until the first instance of a regular expression.
2010/01/04
| perl -n -e 'print "$_" if 1 … /«a class="zem_slink freebase/en/regular_expression" title="Regular expression" rel="wikipedia" …
Calculations
2009/11/17
<img src="http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/perl-one-liners.jpg" alt="Perl One Liners" align="bottom" />This is the third part of a …