On 2/17/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> I want to learn how to build line editing ability into a homemade perl
> script I wrote.
>
> The script takes in keyboard input and formats it, also adding
> specific lines to the beginning and end. Making inpu
I want to learn how to build line editing ability into a homemade perl
script I wrote.
The script takes in keyboard input and formats it, also adding
specific lines to the beginning and end. Making input into a blerb in
a homemade flat database. Nothing complex just markers fore and aft
to make
> "Steven" == Steven M Klass <[EMAIL PROTECTED]> writes:
Steven> Open file
open FILE, " Start tool
open TOOL, "|my_tool with params here" or die;
Steven> Read line by line, edit as neccessary
while () {
s/this/that/;
Steven> Feed line by line my data into the tool
print TOOL $_;
}
Hi all
Ok, my tool is comming along nicely, but here is where I am stuck at. I
currently am opening a file and reading the contents. Then I open a second
file, where I put my modification to the first file. Then this file is fed to
the destination tool. I think this is a BIT redunda
"Steven M. Klass" wrote:
>
> Hi all,
>
> Here is the general problem. I have a file that I need to edit but can't.
im not sure i follow you here, making a backup copy is not an option?
perl -pi.bak -e 's/foo/bar/g' weird_uneditable_file;some_app
weird_uneditable_file;mv weird_uneditab
"Steven M. Klass" wrote:
>
> Hi all,
>
> Here is the general problem. I have a file that I need to edit but can't.
> That file is then fed into another program. Think of the file that I want to
> edit is like a makefile, that I want to use after I tweak it a bit. The
> general idea wo
Hi all,
Here is the general problem. I have a file that I need to edit but can't.
That file is then fed into another program. Think of the file that I want to
edit is like a makefile, that I want to use after I tweak it a bit. The
general idea would be:
1) Find out what needs to be
kl
y
Hope this help
Best wishes
Reg
> Subject: line editing
> Date: Wed, 19 Sep 2001 09:30:14 -0700
> From: "Chia Teng" <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
>
> I have a huge file containing the following patterns to be deleted:
>
> .
On Wed, Sep 19, 2001 at 09:30:14AM -0700, Chia Teng wrote:
> I have a huge file containing the following patterns to be deleted:
[snip]
> Is there a better way to do this in perl ?
A better way? You didn't describe a way to do it in Perl, and your vi
solution wouldn't work in Perl, for what shou
I have a huge file containing the following patterns to be deleted:
.SUBCKT AA
5 lines
.ends AA
.SUBCKT BB
6 lines
.ends BB
.
.
.
In vi it's easy to "search and delete" them. e.g. by
/^\.SUBCKT AA/;/^\.ends AA/d
Is there a better way to do this in perl ?
10 matches
Mail list logo