
KevinR
Veteran

Oct 20, 2008, 10:54 AM
Post #2 of 2
(1395 views)
|
|
Re: [harrry75] Invoking Grep Command from Perl Script
[In reply to]
|
Can't Post
|
|
perl solution:
@line_nums = (); open (my $file, 'orderList.txt') or die "$!"; while (<$file>) { push @line_nums, $. if (/Added source_sys_id=18063bren3650908/); } close $file; or maybe you can quote your grep arguments to use int he shell:
$fileName = "orderList.txt"; $orderNumberSearchStr = "'Added source_sys_id=18063bren3650908'" ; $temp = `grep -n $orderNumberSearchStr $fileName`; You can try that and see if it helps. -------------------------------------------------
|