On Wed, Feb 26, 2014 at 03:59:40PM +, jet speed wrote:
Chaps,
Any quick one liner code in perl were i can get rid off the before and
after wwn each line for file as below
file
---
device name lz_09_red_e10 vsan 200
* fcid 0xef0013 [pwwn 50:00:00:00:99:00:66:7a]
* fcid
Chaps,
Any quick one liner code in perl were i can get rid off the before and
after wwn each line for file as below
file
---
device name lz_09_red_e10 vsan 200
* fcid 0xef0013 [pwwn 50:00:00:00:99:00:66:7a]
* fcid 0xegg015 [pwwn 10:00:00:55:99:a8:d9:c4] [ pe-tgh10-hostb]
device name
On Feb 26, 2014, at 7:59 AM, jet speed speedj...@googlemail.com wrote:
Chaps,
Any quick one liner code in perl were i can get rid off the before and after
wwn each line for file as below
file
---
device name lz_09_red_e10 vsan 200
* fcid 0xef0013 [pwwn
Thanks Jim and Paul, Appreciate your inputs.
Sj.
On Wed, Feb 26, 2014 at 4:47 PM, Paul Johnson p...@pjcj.net wrote:
On Wed, Feb 26, 2014 at 03:59:40PM +, jet speed wrote:
Chaps,
Any quick one liner code in perl were i can get rid off the before and
after wwn each line for file
[EMAIL PROTECTED] (Ronald Yacketta) writes:
Folks,
looking for a clean way to change a value in a file on the fly before it is
processed (ran).
I have a perl script that kicks off several resource scripts (.scr) that are
NOT a valid shell script and can not be ran from the command line
]
Subject: Re: Inline file edit
[EMAIL PROTECTED] (Ronald Yacketta) writes:
Folks,
looking for a clean way to change a value in a file on the fly before
it is processed (ran). I have a perl script that kicks off several
resource scripts (.scr) that are NOT a valid shell script and can
Ronald Yacketta wrote:
From: [EMAIL PROTECTED]
Look at the -i flag. It takes an optional argument, but it sounds like
you don't want to keep a backup so use it without the arg. Think about
it carefully. And test
**VERY** carefully. If you get your code wrong, you've
messed it
Yacketta, Ronald [EMAIL PROTECTED] writes:
Would I be able to use this inline? That is within a perl
script itself? If so, might you provide an example?
If you wanted to make a stand-alone perl script of it, it
would look something like this.
#! /usr/bin/perl -w
$^I = .bak;
while() {
Subject: Re: Inline file edit
Yacketta, Ronald [EMAIL PROTECTED] writes:
Would I be able to use this inline? That is within a perl
script itself? If so, might you provide an example?
If you wanted to make a stand-alone perl script of it, it
would look something like this.
#! /usr
[EMAIL PROTECTED] (Michael R. Wolf) writes:
Other alternatives include
#! /usr/bin/perl -w -i
#! /usr/bin/perl -w -i .bak
$^I = undef;
Oops! May have been misleading. Here's commentary on
alternatives.
$^I = ''; # in-place, but no backup
$^I = '.bak'; # in-place, with backup
[EMAIL PROTECTED] (Ronald Yacketta) writes:
This works great with one exception... the two values in the sed need to be
passed into the script...
IE:
changedbsid.pl OLDSID NEWSID filename(s)
could be ran against 1 or more files at a time.
I havethis which works like a champ on a
$_ in the background
but no dice...
could someone kindle point me in the right direction?
regards
-Ron
-Original Message-
From: Michael R. Wolf [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 09, 2002 15:59
To: [EMAIL PROTECTED]
Subject: Re: Inline file edit
[EMAIL PROTECTED] (Ronald
Folks,
looking for a clean way to change a value in a file on the fly before it is
processed (ran).
I have a perl script that kicks off several resource scripts (.scr) that are
NOT a valid shell script and can not be ran from the command line alone. I
need a way to modify these .scr scripts on
13 matches
Mail list logo