Hello Melvin,
next time please hit "Reply to all", because this message was sent only to me
in private. I specifically request that in my signature:
[QUOTE]
> >
> > Please reply to list if it's a mailing list post - http://shlom.in/reply .
> >
[QUOTE]
Since you have not specified that this was s
Hi Melvin,
On Fri, 15 Jul 2011 01:23:10 -0700 (PDT)
Melvin wrote:
> Hi All,
>
> I am a newbie to Perl. I wanted to write a below utility:-
>
> 1) Read a list of file names (from another file)
> 2) Search for String1 (this is an entire line in the file names
> obtained from the list)
> 3) "gvi
Hi All,
I am a newbie to Perl. I wanted to write a below utility:-
1) Read a list of file names (from another file)
2) Search for String1 (this is an entire line in the file names
obtained from the list)
3) "gvim-dd" or remove that line and insert it right after another
line(after a string2) in
David Wall wrote:
>
>
> --On Saturday, September 06, 2003 7:45 PM -0400 perlwannabe
> <[EMAIL PROTECTED]> wrote:
>
>> OK, I have a new problem. I need to delete an entire line that contains
>> certain text. I have done an extensive search and had no luck finding an
>> adequate answer. Yes, I
"R. Joseph Newton" wrote:
>
> "John W. Krahn" wrote:
> >
> > rename $file, "$file.bak" or die "Cannot move $file to $file.bak: $!";
>
> I would say that this is the wrong place for the rename. Computers do crash.
> If a crash occurs while this program is in progress, then he is left with a
> re
"John W. Krahn" wrote:
> > Also, I would like to run this from within a script instead of from the
> > command line.
> >
> > BTW...using PERL 5.8.0 on Windows2000 Pro
>
> Here is one way to do it:
>
> use warnings;
> use strict;
>
> my $file = shift or die "usage: $0 filename\n";
>
> rename $file,
Perlwannabe wrote:
>
> OK, I have a new problem. I need to delete an entire line that contains
> certain text. I have done an extensive search and had no luck finding an
> adequate answer. Yes, I also saw the FAQ that just refers me to
> Tie::file. The most promising solution was:
>
> perl -n
--On Saturday, September 06, 2003 7:45 PM -0400 perlwannabe
<[EMAIL PROTECTED]> wrote:
OK, I have a new problem. I need to delete an entire line that contains
certain text. I have done an extensive search and had no luck finding an
adequate answer. Yes, I also saw the FAQ that just refers me
OK, I have a new problem. I need to delete an entire line that contains
certain text. I have done an extensive search and had no luck finding an
adequate answer. Yes, I also saw the FAQ that just refers me to
Tie::file. The most promising solution was:
perl -ni.bak -e 'print unless /FOO/;' inp
On Thu, Jul 31, 2003 at 09:32:32AM -0500, Distribution Lists wrote:
> Can someone give me a clue
>
> I want to search through a file for a given string, when the string is
> found then delete the whole line. For example
There's a nice FAQ on this
% perldoc -q 'change one line'
> test.user:
Can someone give me a clue
I want to search through a file for a given string, when the string is
found then delete the whole line. For example
test.user: cd9p06
search for "test.user", then delete "test.user: cd9p06"
Thanks
--
http://www.e-securenetworks.net
http://www.shopper-holic.com
htt
In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] (Mark McLogan) wrote:
> Hi every body!
> I don't know how i can delete a line of a file.
>
> Some body know?
>
> Thnk's
perldoc -q delete
print pack "H*", "4a75737420416e6f74686572204d61635065726c204861636b65722c0d";
--
Scott R. Godin
Hi every body!
I don't know how i can delete a line of a file.
Some body know?
Thnk's
_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional com
get next line
print FILEOUT $_;
}
close(FILEIN);
close(FILEOUT);
Wags ;)
-Original Message-
From: Mark Mclogan [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 07, 2001 08:34
To: [EMAIL PROTECTED]
Subject: Deleting a line
Hi everybody!
somebody know how i can delete a
Hi everybody!
somebody know how i can delete a line of a text file?
i'm tryng some like this
/^line1/d
but i don't know the sintxs to execute some like this
and i don't know if between "/" can be a variable ($_)
Thak's all
_
On Fri, Jun 29, 2001 at 10:21:31AM +1000, Sam Lander wrote:
> I wanted to do this just today. Although, I want to tidy up the resulting
> line a bit by deleting everything before a colon, so I tried this:
>perl -ne "/string/ && print s/.*://" file
> I was surprised that I got this:
>1
At 10:21 AM 6/29/01 +1000, Sam Lander wrote:
> >> At a shell prompt / command line, enter:
> >>
> >> perl -ne '/string/ or print' file
> >>
> >> where string is the string and file is the file.
> >
> >I prefer 'print unless /string/'.
> >As if it matters. ;o]
>
>I wanted to do this just today.
>> At a shell prompt / command line, enter:
>>
>> perl -ne '/string/ or print' file
>>
>> where string is the string and file is the file.
>
>I prefer 'print unless /string/'.
>As if it matters. ;o]
I wanted to do this just today. Although, I want to tidy up the resulting
line a bit by de
--- Me <[EMAIL PROTECTED]> wrote:
> > I have a file having 100 lines.
> > I want to remove the lines, having a particular string, completely
> > from the file. (notreplacing them with blank lines even)
> >
> > Is there a way in perl for doing this ?
>
> At a shell prompt / command line, enter:
>
> I have a file having 100 lines.
> I want to remove the lines, having a particular string, completely
from the
> file. (notreplacing them with blank lines even)
>
> Is there a way in perl for doing this ?
At a shell prompt / command line, enter:
perl -ne '/string/ or print' file
where stri
create $changed: $!";
while() {
print OUT unless /$changed/;
}
close IN;
close OUT;
HTH
John
-Original Message-
From: Deepesh Tiwari [mailto:[EMAIL PROTECTED]]
Sent: 28 June 2001 16:13
To: [EMAIL PROTECTED]
Subject: deleting a line with a particular string.
---
I have a file
> I have a file having 100 lines.
> I want to remove the lines, having a particular string,
> completely from the
> file. (not replacing them with blank lines even)
>
> Is there a way in perl for doing this ?
most defiantly, tho I am a novice at perl right now.
I have sent this to the beginner
---
I have a file having 100 lines.
I want to remove the lines, having a particular string, completely from the
file. (notreplacing them with blank lines even)
Is there a way in perl for doing this ?
--deepesh
23 matches
Mail list logo