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
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
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
>
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
>
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
>
> 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
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 above search and check "inside" each file for
a strin
On Monday 12 July 2004 01:47, Paul Smith wrote:
>
> Thanks, Gunnar. I understand your point of view. Meanwhile, John
> Krahn has kindly provided a solution for my problem, which I very
> much thank. However, to convince you that I was trying to solve the
> problem by myself, I quote below the scrip
(Please, be patient with my ignorance.)
I for one am, don't worry. But I'm *not* patient with suspected
laziness. ;-)
I'd like to see you post some code, where you show us that you are
seriously trying to learn, and where you have at least tried to solve
this new problem.
Thanks, Gunnar. I understa
Paul Smith wrote:
Thanks, John and Gunnar.
You're welcome.
(Please, be patient with my ignorance.)
I for one am, don't worry. But I'm *not* patient with suspected
laziness. ;-)
I'd like to see you post some code, where you show us that you are
seriously trying to learn, and where you have at least
On Sunday 11 July 2004 14:12, Paul Smith wrote:
>
> John W.Krahn wrote:
> >
> > #!/usr/bin/perl
> > use warnings;
> > use strict;
> >
> > ( $^I, @ARGV ) = ( '.bak', 'text_file' );
> > while ( <> ) {
> > s/^#// if /Zyloric/;
> > print;
> > }
>
b> Thanks, John and Gunnar. (Please, be pati
Paul Smith wrote:
I am a beginner with perl. I would like to ask you whether it is
difficult to make a perl script doing the following:
(1) read a text file;
(2) erase the character # placed at the beginning of the line that
contains "Zyloric";
(3) replace the original file with the file got aft
On Sunday 11 July 2004 10:18, Paul Smith wrote:
>
> Dear All
Hello,
> I am a beginner with perl. I would like to ask you whether it is
> difficult to make a perl script doing the following:
>
> (1) read a text file;
> (2) erase the character # placed at the beginning of the line that
> contains "
Dear All
I am a beginner with perl. I would like to ask you whether it is
difficult to make a perl script doing the following:
(1) read a text file;
(2) erase the character # placed at the beginning of the line that
contains "Zyloric";
(3) replace the original file with the file got after the de
14 matches
Mail list logo