I was wondering if anyone knows how I could search files (I assume using grep) and print out only the text that matches the PATTERN I supply. Or even better, if I could only print out one of the backreferences of the pattern I supply.
The purpose is that I have a bunch of files with text in them that contain [link src="..." type="#text"]...[/link] "tags". And I want to be able to write a script to check that the "..." of the src attribute actually points to a file.
Any thoughts? Thanks in advance for any help.
Cheers,
Paul
The purpose is that I have a bunch of files with text in them that contain [link src="..." type="#text"]...[/link] "tags". And I want to be able to write a script to check that the "..." of the src attribute actually points to a file.
Any thoughts? Thanks in advance for any help.
Cheers,
Paul