Re: passing variable to regular expression (PERL)
- From: krisworld <krishnamurthy.iyer@xxxxxxxxx>
- Date: Sat, 08 Sep 2007 03:21:54 -0000
hi
i understand what u say, but my issue is how to pass a variable in a
Regular Expression
i have
aaaa
qqqq
into "SOMETHING"
now i shall loop the complete data which is in $Result SOMETHING
I shall appreciate if u could help me.
kris
and need to extract only values in between { .. } depending on the
value of
On Sep 8, 5:05 am, Bill Marcum <marcumb...@xxxxxxxxxxxxx> wrote:
On Fri, 07 Sep 2007 18:28:45 -0000, krisworld
<krishnamurthy.i...@xxxxxxxxx> wrote:
hi all
say I have a target file as
-----
-----
aaaa = { bbbbbbbbbbbbbbbbbbbb}
qqqq ={ dddddddddddd,
cccccccccccccc}
-------
--------
and i need output as
{ bbbbbbbbbbbbbbbbbbbb}
or
{ dddddddddddd,
cccccccccccccc} depending on aaaa or qqqq
so if i use
echo $Result |perl -lne "print if / aaaa ={ /../ }"
i get result
but i need to put it in loop
while read SOMETHING; do
echo $Result |perl -lne "print if / $SOMETHING={ /../ }"
done
I am not able to do it.
Can any one help me...
regards
kris
while read SOMETHING; do
echo "$SOMETHING" | perl...
done < file
Do you need the while read loop, or can you do the whole thing with
perl?
--
New York is real. The rest is done with mirrors.- Hide quoted text -
- Show quoted text -
.
- References:
- passing variable to regular expression (PERL)
- From: krisworld
- Re: passing variable to regular expression (PERL)
- From: Bill Marcum
- passing variable to regular expression (PERL)
- Prev by Date: Re: How to send multiple files from unix to lotus notes
- Next by Date: Re: passing variable to regular expression (PERL)
- Previous by thread: Re: passing variable to regular expression (PERL)
- Next by thread: Re: passing variable to regular expression (PERL)
- Index(es):
Relevant Pages
|