Re: Input from bash shell to perl -e

2009-03-30 Thread D. Crouse
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 >>

Re: Input from bash shell to perl -e

2009-03-30 Thread John W. Krahn
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 {$/ = "

Re: Input from bash shell to perl -e

2009-03-30 Thread D. Crouse
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

Input from bash shell to perl -e

2009-03-30 Thread D. Crouse
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