The UNIX and Linux Forums
>
Top Forums
>
UNIX for Dummies Questions & Answers
return a word between two words
.
User Name
Remember Me?
Password
google unix.com
Forums
Register
Forum Rules
Links
Albums
FAQ
Members List
Calendar
Search
Today's Posts
Mark Forums Read
Thread
:
return a word between two words
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
#
3
(
permalink
)
05-22-2006
reborg
Administrator
Join Date: Mar 2005
Location: Ireland
Posts: 4,245
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'
reborg
View Public Profile
Find all posts by reborg
Find reborg's past nominations received
Find reborg's present nominations given