extract text between multiple char delimiters rather than a single char
- From: "Dundonald" <mark.dundon@xxxxxxxxx>
- Date: 11 Jul 2006 06:57:42 -0700
Rather than using cut for example, is it possible and straight forward
enough to extract text between a given set of chars?
For example take the following string:
"I am a string with some words and symbols and it doesn't make much
sense."
What if I want to extract anything between the word "some" as a start
and "it" as an end point, so I want the string " words and symbols and
" extracted?
I'm still relatively new to unix, and I probably use the cut command a
lot more than other people who I guess will probably start using awk or
sed for string manipulation. Problem is I'm not that familiar with
either yet so I have consequently got very handy with cut, but it of
course is limited to just using 1 char as a delimiter.
.
- Follow-Ups:
- Re: extract text between multiple char delimiters rather than a single char
- From: Ed Morton
- Re: extract text between multiple char delimiters rather than a single char
- From: Chris F.A. Johnson
- Re: extract text between multiple char delimiters rather than a single char
- Prev by Date: UUOC (was: Using Shell Script to scroll through text)
- Next by Date: KORN shell script to give count of files by date
- Previous by thread: Using filenames (containing blanks) from a .m3u playlist
- Next by thread: Re: extract text between multiple char delimiters rather than a single char
- Index(es):
Relevant Pages
|