All,
can anyone provide some help?
my current output is
E00854), Seq #: 000595 in TLU: st_
and all I want is the E string and cannot get my substr working
Here is my code:
foreach (split /\n/, $EDM_nonactive_tapelist ) {
if (( /\((E\d+)/ ) && ( !m/\*Orig/ ) && (
m
All,
I have this ftp code
sub ftpme {
my $remotehost="ftp.digitalarchives.com";
my $user="cb100524";
my $pass="xxx";
my $data=$scratchtps;
my $ftplog="/usr/local/log/ftp_IrMt_scratchtapes.log";
All,
In my code I am not understanding why my in place edit does not work? Here
is my code:
please help!
thanks,
use strict;
use diagnostics;
use warnings;
my stps="/usr/local/log/scratchtps";
open (TP, ">$stps") || die "could not open file:$!";
open (TP2, ">$irmt ") || die "cou
no nothing is showing up in the file. Here is where I looked for
information on Net::FTP
http://search.cpan.org/~gbarr/libnet-1.19/Net/libnetFAQ.pod
ok I will look in perldoc -f package. Is there a better place though?
Chris Devers <[EMAIL PROTECTED]>
09/15/2004 07:04 PM
Please respond
its not that I do not understand its purpose, but maybe how to use it??? I
am curious b/c this has worked for me before in other programs. I will
send this whole code.
Derek B. Smith
OhioHealth IT
UNIX / TSM / EDM Teams
614-566-4145
[EMAIL PROTECTED] (Peter Scott)
Sent by: [EMAIL PROTECTE
Here is my entire code. I need help in getting the in place editor working b/c from my reading this is correct!
Derek B. Smith
OhioHealth IT
UNIX / TSM / EDM Teams
614-566-4145
- Forwarded by Derek Smith/Staff/OhioHealth on 09/16/2004 03:18 PM -
[EMAIL PROTECTED]
09/16/2004 12:04 P
Right thanks forgot about that! So how do I out this failed info to
STDOUT (ftplog), b/c if it does fail I would want to know!
As far as the $^ I variable, yes I have tried just opening the files and
reading and writing from them! Thanks for the tips and I am still GREEN !
:)
What could be
ok sorry... must of missed that about the in place editor and is
restrictions ! Please ignore that last part of my last email!
[EMAIL PROTECTED] (Peter Scott)
Sent by: [EMAIL PROTECTED] (Peter Scott)
09/16/2004 06:14 PM
Please respond to Peter
To: [EMAIL PROTECTED]
c
ok so $^ I is only for the diamond operator. Understood. So for
situations when not using the diamond operator, $^ I for making backup
copies is useless, so thr rename function will have to suffice.
Is this the best way?
thanks,
[EMAIL PROTECTED] (Peter Scott)
Sent by: [EMAIL PROTECTED
yes my ftp code has always worked, so lets move on!
thanks,
Derek B. Smith
OhioHealth IT
UNIX / TSM / EDM Teams
614-566-4145
Chris Devers <[EMAIL PROTECTED]>
09/17/2004 11:14 AM
Please respond to Perl Beginners List
To: [EMAIL PROTECTED]
cc: Perl Beginners List <[
All,
Was hoping for some advise b/c I cannot seem to get this to work.
My problem is that it attaches the path name when I need to actual data
attached. So my goal is as if it would be
cat test |uuencode test | mailx -s test [EMAIL PROTECTED]
thanks,
my $scratchtps = "/usr/local/log/filenam
This works great, thnaks!
I was missing the $msg->attach(
Type => 'image/gif',
Id => 'InternalFileNameA.gif',
Path => 'FileNameA.gif'
);
block. Prior I was doing this in one full swoop.
derek
"Josimar Nunes de Oliveira" <[EMAIL PROTECTED]>
09/21/2004 01:10 PM
I am a beginner, but I love to see all the knowledge transfer so keep the
moderate to difficult questions coming!
thanks,
Derek B. Smith
OhioHealth IT
UNIX / TSM / EDM Teams
614-566-4145
Errin Larsen <[EMAIL PROTECTED]>
09/24/2004 11:44 AM
Please respond to Errin Larsen
To: Je
Perl'ers
I am reading Object Oriented Perl pages 52 and 53 for setting up a module.
It is telling me in order to use a routine from a different file you have
to
1) choose a lib directory
2) export PERL5LIB=.../.../.../
use lib /usr/local/perl/my.pl
3) created nested subdirs for each compon
All,
I am unsure if I pissed everyone off, b/c no one responded??? If I did I
did not mean to my apologies.
Anyway can anyone provide some insight?
I am reading Object Oriented Perl pages 52 and 53 for setting up a module.
It is telling me in order to use a routine from a different file yo
Yes it does great thank you! But a few more things. Once I create
my code, how do I pass a data file in a different program to a specific
routine that lives in a different file?
am I supposed to respond and post at the bottom of you answer?
Derek B. Smith
OhioHealth IT
Chris Dever
I agree, Gunnar is mean. Mean people suck!
derek
Chap Harrison <[EMAIL PROTECTED]>
10/26/2004 01:37 PM
To: Gunnar Hjalmarsson <[EMAIL PROTECTED]>
cc: Perl Lists <[EMAIL PROTECTED]>
Subject:Re: Printing to a file
> Wait a minute there. I'm not lear
yes I do agree, some people need to try harder at their code and be more
descriptive in their problems. Gunnar, nothing personal! : )
Derek B. Smith
OhioHealth IT
UNIX / TSM / EDM Teams
614-566-4145
"JupiterHost.Net" <[EMAIL PROTECTED]>
10/26/2004 04:01 PM
To: Perl Lists <[E
All,
Any ideas would be much appreciated! thanks!
I have having issues using this module I installed. The module is
Net::IPv4Addr.
Here is my code
use strict;
use warnings;
use diagnostics;
use Net::IPv4Addr qw( :all );
my $var = "23.23.109.103";
print "$var\n";
#if ($var =~ m/^\d+$/) {
#
All,
Did anyone have any ideas I only received one response! Thanks
I have having issues using this module I installed. The module is
Net::IPv4Addr.
Here is my code
use strict;
use warnings;
use diagnostics;
use Net::IPv4Addr qw( :all );
my $var = "23.23.109.103";
print "$var\n";
#if
ok thanks!
Lawrence Statton <[EMAIL PROTECTED]>
Sent by: [EMAIL PROTECTED]
12/07/2004 12:08 PM
Please respond to Lawrence Statton
To: [EMAIL PROTECTED]
cc: [EMAIL PROTECTED]
Subject:Re: ip4 check
> --=_alternative 005C6D8D85256F63_=
> Content-Type:
All,
I am wondering if there are any modules out there that invokes and
completes remote installs of a backup application on Windows machines? I
am familiar with rdist, but is this compatible with Windows.
thanks,
Derek B. Smith
OhioHealth IT
UNIX / TSM / EDM Teams
Does anyone know what modules are good for DNS lookups and data capturing?
My goal is to open a DNS db file under /var/named for example then search
for certain server names with a certain object class and a certain object
description!
We use Lucent's Quip for entering new devices into this domain.
Ok just thought a quick email for some modules would suffice. I will
start at cpan.
thank you, !
Derek B. Smith
OhioHealth IT
UNIX / TSM / EDM Teams
"JupiterHost.Net"
if you want to use a built in function then use
$.
or its alternatives $NR, or $INPUT_LINE_NUMBER
By definition this says "the current input line number of the last file
handle that was read."
my $linect=$.
while ( ) {
if ( $linect > 9 ) {
do whatever ...
}
}
derek
oops I missed a line:
my $linect="$.";
while ( ) {
if ( $linect > 9 ) {
do whatever ...
}
$linect++;
}
need to use double-quotes around variable $.
thanks for the correction... keeps me on my perl learning toes.
Derek B. Smith
OhioHealth IT
UNIX / TSM / EDM Teams
you are correct, you do not need " " around $.
thank you!
I was using strict and warnings, but must of had another error.
I am unfamiliar with the variable $.? I tried playing with it, but was
unsuccessful. I could not find it in cookbook nor in programming perl.
linect=$.
linect=1;
while ( )
Could not find this variable in perlvar under 5.8.0 for sun solaris
can you explain it?
Derek B. Smith
OhioHealth IT
UNIX / TSM / EDM Teams
"Jenda Krynicky"
Yes there was some mis-communication as I thought he was referring to
variable $.? as opposed to $.
Derek B. Smith
OhioHealth IT
UNIX / TSM / EDM Teams
614-566-4145
"Graeme St.
All,
to get the number of interfaces via a snmp call from a perl program I would
say:
get_request("1.3.6.1.2.1.2.1.0");
After referencing the MIB, I can follow the path to interfaces, but I get
lost at 0 as there is no 0 on the MIB map.
Is there another map?
BEGIN
- - - - - - - -
iso 0
org3
do
All,
to get the number of interfaces via a snmp call from a perl program I would
say:
get_request("1.3.6.1.2.1.2.1.0");
After referencing the MIB, I can follow the path to interfaces, but I get
lost at 0 as there is no 0 on the MIB map.
Is there another map?
BEGIN
- - - - - - - -
iso 1
org 3
d
Well technically it is not a perl question, but in my Perl for system
administration pg 406 there was an example of retrieving how many
interfaces are on a device via perl code.
The actually code was :
get_request("1.3.6.1.2.1.2.1.0");
and I wanted some help in understanding the 1.0 b/c 2 leave
Brian,
awesome!
thank you,
Derek B. Smith
OhioHealth IT
UNIX / TSM / EDM Teams
[EMAIL PROTECTED]
rum-health.org
All,
am I using the correct method to get the return code whether a previous
line or command was 0 false or 1 true?
thank you,
#!/usr/local/bin/perl -w
use strict;
use strict 'subs';
my $file = qq(/tmp/mbfree);
open (F, "+<$file") or die "unable to open file $file $!\n";
foreach () {
ok so $? states CHILD_ERROR or last status returned by the last ` `
command.
$! states yields the current value of errno
in shell if I say it will give me a true or false value.
cat /tmp/foo
if [ $? -eq 0 ]
then
echo yes command succeeded
else
echo no.
fi
In Perl if I wanted to r
It is difficult for me to bottom post as I am using Lnotes. Sorry.
ok so yes In general, I thought:
SHELL 0= true
Perl 0 = false
SHELL 1 = false
Perl 1 = true
what do you mean "non zero is false in this context." b/c in general I
thought as above. Yes it is opposite in Perl as above.
Fina
$exit_value = $? >> 8
$signal_num = $? & 127;
$dumped_core = $? & 128;
ok this helps, thanks! But, in my small block of code I am using $? >> 8
as so
system ("cat /tmp/used"); # /tmp/used does not exist so
this should return 0 for false in Perl and 1 false in Shell
my $exval =
understood!
thanks,
"Wiggins
d'Anconia"
<[EMAIL PROTECTED]
I am running AIX 5.2 with gcc 3.3.2
Can anyone help? I looked for the specific list and could not find it.
Here are my errors after a make with CC pointed to cc_r and
/usr/local/bin/gcc :
(See attached file: out)(See attached file: outwithgcc)
derek
out
Description: Binary data
outwithgcc
yeah thats what I thought and the problem is Perl came installed under
/usr/bin by default. Obviously is was compiled by cc_r and currently I am
trying to get a trial version of XLC IBMs AIX C compiler.
thank you,
Derek B. Smith
OhioHealth IT
UNIX / TSM / EDM Teams
All,
Can someone explain this code line by line?
Obviously I understand most of it but lines 4, 5, 6 and 10 I am fuzzy.
For line 4: if ($query) . if what? Here I would expect to see if ( -s
$query ) or something like a return code/exit code value check like $? >>
8.
What is if ($query) say
excellent thank you to JuniperHost and you Wiggens.
So here is what I ended up with:
> 1> use Net::DNS;
2>my $res = Net::DNS::Resolver->new;
3> my $query = $res->query("example.com", "NS");
4>if ($query != undef) {
5>foreach ($query->answer) {
6> if ($_->type eq 'NS'
my @a=();
my $res = Net::DNS::Resolver->new;
my $query = $res->query(".ohnet", "NS");
if ( $query != 0 or $query != undef or $query != ' ' ) {
foreach ($query->answer) {
if ( $_->type eq 'NS' ) {
#next unless $_->type
Nevermind I got it!
my @a=();
my $e=0;
my $res = Net::DNS::Resolver->new;
my $query = $res->query(".ohnet", "NS");
if ( $query != 0 or $query != undef or $query != ' ' ) {
foreach ($query->answer) {
if ( $_->type eq 'NS' ) {
Joe,
if you still care, here is my final code. Will you please eval it and them
comment again?
thanks,
my $outfile0 = qq(/home/root/dns_servers.plout);
open (F, "+>$outfile0") || die "could not open file: $outfile0 $!";
my @a=();
my $e=0;
my $res = Net::DNS::Resolver->new;
my
The reason I tested all three situations: if ( $query != 0 or $query !=
undef or $query != ' ' ) {
was for knowledge and repitition that everytime I looked at the code I
would know what all 3 meant and that they had the same meaning, 0. In
addition I wanted to be anal !
> Maybe a dumb qu
People of the Perl,
There is this website on our internal LAN that serves as a DNS mgmt tool
and it is called qip developed by Lucent. I know it is written in Perl but
I believe it also uses java script. Below is the main page and is show
IE's status bar referencing a perl script within the seco
Below is the gui query
|--+--|
| | |
|Object List by Administrator | |
|--+--|
| |
How would I get all hosts for a particular domain using Net::DNS?
I tried *.domainname in my query.
thanks,
"Wiggins
d'Anconia"
Because I am trying to find a way to get all the clients in a domain via
Net::DNS and see if there is an existant "object class" with Server in it.
But using Net::DNS I believe will not help b/c I think the website uses
java script.
Again, here is my problem that needs solved. thank you,
There i
I have the file as attached and I want to take 104 and 356 to get a sum.
Here is my code:
while () {
if ( $. > 6 ) {
if ( $_ !~ "ANR*" or $_ !~ "ANS*" ) {
print FFF $_;
}
}
next unless $_ /
#!/usr/bin/perl
## Set pragmas (LC) and modules (UC)
$^W = 1;
use strict;
use strict 'subs';
## Begin Logic
$ENV{"PATH"} = qq(/home/root:/usr/bin:/usr/sbin);
my $w="40";
my $total="0";
my $outfile1 = qq(/home/root/tsm2_clients.out);
my $outfile2 = qq(/home/root/tsm2_clients.plout);
open (FF, "
I took everyone's advise and understood. thank you! The code ###- - -###
solved it! Now for an explanation:
during the while loop, the $_ contains return code such as:
ANS8000I Server command: 'tsm:select count(*) from nodes'
ANR1699I Resolved TSM to 2 server(s) - issuing command SELECT aga
greetings.
cool beans! What perldoc has ###- -### in it?
...marked with...?for me is not enough of an explanation. sorry.
yes as I read in programming perl as well lead me to this solution. On pg.
93 it states
" =~ binds a string expression to a pattern match, substitution, or
translatio
is this line
:>$_=~s{delete}{};
a named unary call?
Derek B. Smith
OhioHealth IT
UNIX / TSM / EDM Teams
John Doe
Will someone provide clues as to how use logfile rotate on multiple files?
I looked at the rotate.pm and did not see anything this the code. I tried
one File => line followed by multipl scalers but that did not work then I
tried multiple File => references and this did not work???
thank you,
got it dude! thanks;
my code is
foreach ( $file1, $file2, $file3, $file4 ) {
my $logs = new Logfile::Rotate (File => $_,
Count => 10,
Gzip => '/usr/bin/gzip',
Dir
Is there a visual perl editor out there, freeware or shareware for any
Linux flavor?
Derek B. Smith
OhioHealth IT
UNIX / TSM / EDM Teams
Thank you, but I was hoping to have a editor compatible with Redhat and or
HP and or AIX that gives you a color coded interface, such when there is a
syntax error it color codes it in red. If you have ever seen or used a VB
editor you know what I mean. Currently I use vi all the time, does vim
Hello perl people
I am wanting to know if there is a way to disable users from breaking out
of a perl script, specifically CNTRL C , D? Hopefully it is just a one
liner b/c I would also like to use this in KSH scripts. I will look in
my learning perl book as well!
thank you!
Derek B. Sm
People of the Perl,
I am in need of some help! Here is the info you need for my samba mount
points.
directories: ~emstat/win32/backup/012004155140/pc*,
~emstat/win32/backup/01210415175/pc*, ~emstat/win32/pc*
files: under each of these subdirs, pc[#], I have "training
2001.eml" files
David,
under each of these suddirs, I need all the eml files deleted but there
are thousands of them and the actual file name is "training 2001.eml"
so my questions still remain,
Can I have this search recursively down under all the pc subdir names?
Can I create a scalar like "/home/emstat
All,
Is there a method or module that allows you to create a trap? For
instance, in ksh or any shell I can create a system trap that will
disallow any keystroke, other than the expected user input specifically
cntrl C, D, \ or U. All of these are mapped to a SIGNAL in
/usr/include/sys/sign
thanks for the quick response!
but could you give me an example of what syntax goes in { something
} ;
so
trap { ... example ... } so SIGNAL(s) would be inside the curly braces?
Derek B. Smith
OhioHealth IT
UNIX / TSM / EDM Teams
"Jayakumar Rajagopal" <[EMAIL PROTECTED]>
03
does the $|=1; mean ignore buffered output?
My goal is not to tell the program to sleep so perldoc -f sleep has
nothing to do with my goal. My goal is to disallow users from entering
keystrokes SIGNALs that can break then out of the program.
thanks again!
Derek B. Smith
OhioHealth IT
UNIX / TS
All,
was hoping to get some ideas on what to use to get all, if any files have
been modified and if so give the file names and dates for these changed
files? If any files were modified more than once then I need to output
the filenames and the date/time as well for that n amount of times.
People of the Perl,
from my understanding strict disallows soft references, ensures that all
variables are declared before usage and disallows barewords except for
subroutines.
what is a soft reference?
what is a bareword?
why is strict disallowing a compile here When I comment out strict
Guay,
ooops. that would be it! someone's else's eyes are always better!
Thanks for the nice explanation! My code is now compiling smoothly!
What do you mean when you say " Just use $line inside the while, and you'll read one
line at a time." ???
I am doing this, aren't I?
FROM GUA
Yet another great explanation... thank you! But I still need to know how
to print each specific element # along with its data?
Is this the right way to go for storing each line in its own element???
while $line < FILEHANDLE >
my @tsm = < FILEHANDLE >
foreach $_ (@tsm)
print $_ , "\n";
Derek
Jean,
can I email you from know on??? : ) You are so through! Thank you!
I now understand the one line code and slurping coding within the array!
My reasoning for the array was so that I can only and easily print out
specific elements. So do you still suggest just using the while construct
All,
can anyone advise?
I have MD5 config'ed and compiled and it is in my PATH variable. Thank
you!
#> perl -de 1
Loading DB routines from perl5db.pl version 1.23
Editor support available.
Enter h or `h h' for help, or `man perldebug' for more help.
main::(-e:1): 1
DB<1> use MD5;
Can'
so does that mean a recompile of perl ? Can't I just edit that array to
include this path?
that is right @INC is not correct. What is an example of you PERL5LIB
variable?
Derek B. Smith
OhioHealth IT
UNIX / TSM / EDM Teams
"Wiggins d Anconia" <[EMAIL PROTECTED]>
04/06/2004 11:36 AM
I installed it via
perl Makefile.PL
make
make test
make install.
I did use Digest::MD5-2.33
ok thanks anyway!
Derek B. Smith
OhioHealth IT
UNIX / TSM / EDM Teams
Bob Showalter <[EMAIL PROTECTED]>
04/06/2004 11:49 AM
To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>, [EMAIL PROTE
this was done! thanks!
Derek B. Smith
OhioHealth IT
UNIX / TSM / EDM Teams
Does anyone have a one liner using perl, awk or sed that will insert "mb"
between the "6" and "f" ?
For example, 144.06 free
Derek B. Smith
OhioHealth IT
UNIX / TSM / EDM Teams
614-566-4145
this works!
thanks so much and here is another solution to share...
awk '{print $1" " $2}' /tmp/filename |tr -s " "|sed 's/ / mb .g'
Derek B. Smith
OhioHealth IT
UNIX / TSM / EDM Teams
614-566-4145
James Edward Gray II <[EMAIL PROTECTED]>
04/08/2004 01:12 PM
To:
Does anyone have a method to count the # of characters in present working
dir?
thanks
Derek B. Smith
OhioHealth IT
UNIX / TSM / EDM Teams
I have an application system command that is like tail -f in UNIX and I
want to say
x=1
while x < 10
do
'command' append to log
print "\n" append to log
issue HANGUP or KILL SIGNAL
x+=1
done
How do I issue a hangup signal to this process using perl?
Derek B. Sm
If you dont understand my question then I assume you do not know unix or
tail -f ? I want to after a sleep of 5-8 seconds, send a kill signal to
the previous command then increment the counter. thank you!
Derek B. Smith
OhioHealth IT
UNIX / TSM / EDM Teams
Bob Showalter <[EMAIL PROT
yeah ok whatever I want to use perl not ksh...as simple as that.
Derek B. Smith
OhioHealth IT
UNIX / TSM / EDM Teams
"Jayakumar Rajagopal" <[EMAIL PROTECTED]>
05/07/2004 01:16 PM
To: <[EMAIL PROTECTED]>, "Bob Showalter" <[EMAIL PROTECTED]>
cc: "Beginners Perl"
thank you! This was all I wanted as I am teaching myself perl and am
still new.
Derek B. Smith
OhioHealth IT
UNIX / TSM / EDM Teams
Phil Schaechter <[EMAIL PROTECTED]>
05/07/2004 02:08 PM
To: [EMAIL PROTECTED]
cc:
Subject:Re: process signals
They e
Can any provide some help?
I am getting this error:
edm01:/usr/local/bin/perl>> perl -c tape_rotation_vaulting.pl
String found where operator expected at tape_rotation_vaulting.pl line 64,
near"
(Do you need to predeclare TWENTYONEDAYS_STRING?)
syntax error at tape_rotation_vaulting.pl l
why not use & for a function call? Aren't & and ( ) the same?
I used local originally b/c I wanted to use this globally from within the
function. Is there a preferred way to use local?
thanks
Derek B. Smith
OhioHealth IT
UNIX / TSM / EDM Teams
614-566-4145
"Wiggins d Anconia" <[EMAIL P
I have an application system command that is like tail -f in UNIX and I
want to say
x=1
while x < 10
do
'command' append to log
print "\n" append to log
issue HANGUP or KILL SIGNAL
x+=1
done
How do I issue a hangup signal to this process?
thanks
Derek B. Smith
All,
I have an array of 40 elements and I want to run a system app command
against all the elements simultaneously ...well not line by line as in a
for loop.
I have tried
does anyone know how to spit out all 40 elements so the app command does
not eject tapes one by one?
thanks
Derek B. Sm
this will work! thanks!
one more question...
I am setting an array up to be the output of a system app command like
this
my @ftapes = system (evmvol -w label_state=3|grep barcode");
print $ftapes[0];
it prints everything...meaning 5 lines. Or when I say print $ftapes[0,1]
it errors saying
"
All,
was hoping anyone could provide some syntax help.
I want to populate an array from a system app call like so and then
print out each element.
my @ftapes = system ("evmvol -w label_state=3|grep barcode");
print $ftapes[0]
or
print $ftapes[0,1]
The problem is it prints out all the
cool, but why doesn't
my @ftapes = system ("evmvol -w label_state=3|grep barcode");
print $ftapes[0]
OR
print $ftapes[0,1]
work?
I see that it does not support multidimensional arrays, so how do I
implement this using system?
Derek B. Smith
OhioHealth IT
UNIX / TSM / EDM Teams
614-566-4145
excellent I did not know that about system!
thanks again!
Derek B. Smith
OhioHealth IT
UNIX / TSM / EDM Teams
James Edward Gray II <[EMAIL PROTECTED]>
05/25/2004 02:08 PM
To: [EMAIL PROTECTED]
cc: Perl Beginners <[EMAIL PROTECTED]>
Subject:Re: arra
ok so now I can get all elements printed using
my @ftapes = ( );
my @ftapes = `evmvol -w label_state=3|grep barcode`;
foreach $_ (@ftapes) {
print $_ , "\n";
}
so now I want to use multidimensional arrays using print $ftapes[0,1]
does pri
here is the sample output.
barcode=E01124
barcode=E01178
barcode=E01195
barcode=E01225
barcode=E01232
maybe I am not understanding when a multidimensional array would be
useful? when are these references useful?
Derek B. Smith
OhioHealth IT
UNIX / TSM / EDM Teams
James Edward Gray II <
here is the full output.
volid=
name=
luname=st_9840_acs_0
slot_index=1
barcode=E01124
mtype=35
atype=0
sequence=0
mside=0
state=0
open_count=0
v_flags=0
comment=
flags_value: 0x108
flags: RVM_IS_FOREIGN RVM_IS_IN_REAL_LU
volid=
name=
luname=st_9840_acs_0
slot_in
James,
yes it does thanks! Will you be so kind and answer my other question too?
maybe I am not understanding when a multidimensional array would be
useful? when are these references useful?
is there a perldoc I can read as well?
Derek B. Smith
OhioHealth IT
UNIX / TSM / EDM Teams
Jame
All,
I am having some trouble figuring this out. I want to enter some text
within a pre-existing file. Here is what the file would look like
E00140
E00141
E00143
.
.
.
here is my code thus far
#!/usr/local/bin/perl -w
use strict;
my $ejectapes = "/usr/local/bin/perld/exports";
open (ACSLS
ok does this s/^(?=E\d{5})/eject\t0,0,0\t\n/ while <>;
say...
from the beginning of the line match 0 or 1 E's with any digits then print
the eject string? I am not following the { 5 }.
my E string is 6 characters long, so why the 5?
isn't there a insert regular expression?
use strict;
my $ej
awesome I am making progress. I used ".bak" instead of ' ' b/c I do
not want to remove the file after $ ^ I the edit is done.
BUT,
I do not want to replace the E strings with the eject string instead I
want to put the eject string in from of the E string and write now it is
replacing ?
t
here is what I use in awk language to get
eject 0,0,0 E001420
eject 0,0,0 E001430
awk '{print "eject""\t""0,0,0""\t" $1 }' filename > newoutput.
the curren code below is replacing E strings with eject strings
Derek B. Smith
OhioHealth IT
UNIX / TSM / EDM Teams
614-566-4145
"Jupiter
the last mail was the solution! Thanks for the persistence!
the code is to insert eject 0,0,0 string in front of the E string like so:
eject 0,0,0 E4030
from a file that contains just E strings
#!/usr/local/bin/perl -w
use strict;
my $ejectapes = qw(/usr/local/bin/perld/exports);
no thanks! but why are you setting ejectapes as an array and then
calling it with @ instead of $?
my @ejectapes = qw(/usr/local/bin/perld/exports);
($^I, @ARGV) = ('.bak', @ejectapes);
instead of
my @ejectapes = qw(/usr/local/bin/perld/exports);
($^I, @ARGV) = ('.bak', $ejectapes);
understood!
ok now if the *.bak file exists would I say something like: in order to
make a bakup or a bakup
use warnings;
use strict;
my @ejectapes = qw(/usr/local/bin/perld/exports);
($^I, @ARGV) = ('.bak', @ejectapes);
if ( -s '.bak' ) {
rename (".bak", ".bak1") || die "cannot renam
1 - 100 of 246 matches
Mail list logo