View Single Post

  #3 (permalink)  
Old 04-13-2008, 02:45 AM
rockdalinux's Avatar
rockdalinux rockdalinux is offline
Contributors
User
 
Join Date: May 2005
Location: Bangalore
My distro: RHEL, HP-UX, Solaris, FreeBSD, Ubuntu
Posts: 581
Rep Power: 7
rockdalinux is a jewel in the rough rockdalinux is a jewel in the rough rockdalinux is a jewel in the rough rockdalinux is a jewel in the rough
Default

I'm not sure what exactly you want but patterns (text beween two words or pattern) can be selected using sed:
Code:
sed -n '/WORD1/,/WORD2/p' httpd.conf
sed -n '/<VirtualHost*/,/<\/VirtualHost>/p' httpd.conf
__________________
Rocky Jr.
You may have my body & soul, but you will never touch my pride!

If you have knowledge, let others light their candles at it.

Certified to work on HP-UX / Sun Solaris / RedHat
Reply With Quote