Re: Writing my first perl script

2005-05-06 Thread Offer Kaye
On 5/6/05, macromedia wrote: > > Hello, > > I'm not sure about the login or how I should approach what I want to > achieve. I require a script that does the following. > > 1. Search a directory and all sub-directories for a certain file > extension. (Ex. .txt) > > 2. Get the results of the abov

Re: Writing my first perl script

2005-05-06 Thread Michael Gale
Hello, A bash script would be a better choice for this particular request. #!/bin/bash find . -type f -name "*.txt" -print | xargs grep -l 123 >> externalfile The above command would search the current directory plus all sub- directories for all files the end in a ".txt" and search each

RE: Writing my first perl script

2005-05-06 Thread macromedia
mpilation errors. -Original Message----- From: Gavin Henry [mailto:[EMAIL PROTECTED] Sent: Friday, May 06, 2005 12:24 PM To: beginners@perl.org Subject: Re: Writing my first perl script On Friday 06 May 2005 16:50, macromedia wrote: > Something like this? > > #!/usr/bin/perl -w >

Re: Writing my first perl script

2005-05-06 Thread Gavin Henry
essage- > From: Gavin Henry [mailto:[EMAIL PROTECTED] > Sent: Friday, May 06, 2005 11:24 AM > To: beginners@perl.org > Subject: Re: Writing my first perl script > > > > > Hello, > > > > I'm not sure about the login or how I should approach what I want to >

RE: Writing my first perl script

2005-05-06 Thread macromedia
ile () { if ($line =~ /$num/ { print $line; } } close FILE; } -Original Message- From: Gavin Henry [mailto:[EMAIL PROTECTED] Sent: Friday, May 06, 2005 11:24 AM To: beginners@perl.org Subject: Re: Writing my first perl script > > Hello, > > I'm n

Re: Writing my first perl script

2005-05-06 Thread Gavin Henry
> > Hello, > > I'm not sure about the login or how I should approach what I want to > achieve. I require a script that does the following. Here are the quick answer, which provide you some reading material: > > 1. Search a directory and all sub-directories for a certain file > extension. (Ex. .t