ISBN filter

This is a little perl script I wrote to filter out the ISBN’s from Delicious Library’s “Export…” feature, although it’s a generic filter so it should work for any similar purpose. Originally written to handle a problem with the Bookshelf app on Facebook. There’s no separate file, just copy-and-paste from below:

#!/usr/bin/perl -w

## This script takes the output of Delicious Library's "Export" feature and 
## filters everything but the ISBN's.

## usage: dl-isbn-list [filename]
## Default filename is '-' (STDIN)
## Output is a list of ISBN's, one per line, to STDOUT.

while (<>) {
  print $1 . "\n" if /(\d{9}[0-9X])/;
}

Drop a comment if you find this useful.

One Response to ISBN filter

  1. Pingback: SonicChicken weblog » Blog Archive » Facebook

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>