Corion, when I run your code, it prompts that "bzip is not an internal command...." What am I missing? Actually I would like to read a txt inside a bz2 without extracting first and pattern matching the content with some keyword and output the result to an array or text file.