Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Linux Links | Bling | About BLU

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Regular Expression Search and parse?



 Mark Woodward wrote: 
> ...does anyone know of a utility that 
> uses parameterized regular expressions as a search mechanism and outputs 
> only the parameters that were found? 

Awk, Perl, and probably sed. 


> So, if I have file with a lot of lines that look like this: 
> 
> Title: The Long and Winding Road [ISBN:123456] 
> Descr: A boring book about boring roads 
> Author: A dull cab driver 
> .... 
> 
> I could execute: 
> 
> myregex "Title:*\[ISBN:$1\]" file.txt 
> 123456 
> .... 
> 
> and get an output of all the ISBN numbers 


BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org