The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #3 (permalink)  
Old 05-22-2006
reborg's Avatar
reborg reborg is offline
Administrator
 
Join Date: Mar 2005
Location: Ireland
Posts: 3,513
Quote:
Originally Posted by bryan
how do i get a word that exists between two words

eg: this is bryan
My input to command would be this and bryan
and output should be 'is'

Is there a command i can use?

Code:
sed -n 's/word1[ ][ ]*\([^ ]*\)[ ][ ]*/\1/p'
Reply With Quote