Thanks :)
On Mon, Mar 30, 2009 at 12:02 PM, John W. Krahn wrote:
> D. Crouse wrote:
>>
>> I have a perl -e function in my .bashrc file.
>> This sources in the perl -e function so I can run it by just the command
>> name.
>> I'm having trouble with the substitution of my $1 bash variable into
>>
D. Crouse wrote:
I have a perl -e function in my .bashrc file.
This sources in the perl -e function so I can run it by just the command name.
I'm having trouble with the substitution of my $1 bash variable into
the perl -e function.
Here is what I have so far.
grepi ()
{
perl -ne 'BEGIN {$/ = "
SOLUTION !
ah I got it !!! :)
You have to use the $ENV
grepi ()
{
searchfor=$1 \
perl -ne 'BEGIN {$/ = "\n\n"} print if /$ENV{searchfor}/' < $2
}
Just an hour or two of working on it...and it finally pas out ! ! :) WOOT !
On Mon, Mar 30, 2009 at 11:30 AM, D. Crouse wrote:
> I ha
I have a perl -e function in my .bashrc file.
This sources in the perl -e function so I can run it by just the command name.
I'm having trouble with the substitution of my $1 bash variable into
the perl -e function.
Here is what I have so far.
grepi ()
{
perl -ne 'BEGIN {$/ = "\n\n"} print if /$1