Hi All,
I need to get $ACTRUN and others value defined here manully by running command like ACTRUN=`cat /tmp/HOSTSTATUS| tail -1 | awk '{print $2}'`;
In short I want to cat file and assign value to all $ACT variables. Any Idea ? - #!/usr/bin/perl -w
-
-
$ACTRUN=78;
-
$ACTLIMIT=10;
-
$ACTFENCE = 0;
-
$ACTDATE='02/18/08';
-
$ACTTIME='19:01';
-
$ACTSTATE='LTI';
-
$ACTMETHOD=JW;
-
open(FILE, "</tmp/HOSTSTATUS") || die "cannot open /tmp/HOSTSTATUS : $!\n";
-
while ($line=<FILE>)
-
{
-
chomp($line);
-
@line=split(' ',$line,11);
-
#@line{ 'CPUID', 'RUN', 'NODE', 'LIMIT', 'FENCE', 'DATE', 'TIME', 'STATE', 'METHOD', 'DOMAIN' }=@line;
-
-
($CPUID,$RUN,$NODE,$FTA,$LIMIT,$FENCE,$DATE,$TIME,$STATE,$METHOD,$DOMAIN)=@line;
-
#print "$CPUID $RUN $NODE $LIMIT $FENCE $DATE $TIME $STATE $METHOD $DOMAIN" ,"\n";
-
print $ACTRUN;
-
if ( $RUN == $ACTRUN ) {print "";}
-
else { print "$CPUID is not OK run #";}
-
-
if ( $LIMIT == $ACTLIMIT ) { print "";}
-
else { print "$CPUID has LIMIT Problem \n";}
-
-
if ( $FENCE == $ACTFENCE ) {print "";}
-
else { print "$CPUID has FENCE Problem\n";}
-
-
if ( $DATE eq $ACTDATE ) {print "";}
-
else { print "$CPUID has DATE Problem\n";}
-
-
if ( $TIME eq $ACTTIME ) {print "";}
-
else { print "$CPUID has TIME Problem\n";}
-
-
if ( ${STATE} eq ${ACTSTATE} ) {print "";}
-
else { print "$CPUID has STATE Problem\n";}
-
-
if ( $METHOD eq $ACTMETHOD ) {print "";}
-
else { print "$CPUID has METHOD Problem\n";}
-
-
-
#SWITCH: {
-
# $RUN != $ACTRUN { print "$CPUID RUN # ok";};
-
# }
-
-
}
-
close (FILE);
1 1110
Getting value automatically.
I need to get $ACTRUN and others value defined here manu[a]lly automatically and manually are mutually exclusive, define what you are trying to do without contradicting yourself and hopefully someone can help.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: David Messner |
last post by:
Ok I know this is simple but the statement eludes me...
I have a date field where I want the default value on the data entry form's
date field to be the last date entered. I figure I can do this...
|
by: deko |
last post by:
What is it with these dates? What are they so much trouble? All I want to
do is subtract an hour, but not if that makes dtmTest less than dtmClt.
Dim dtmStart As Date
Dim dtmEnd As Date
Dim...
|
by: Thelma Lubkin |
last post by:
I have a form/subform with the common one-to-many relationship.
The form allows user to display records and move to other records
via the selector, to add,delete, and edit them, with the related...
|
by: Jason L James |
last post by:
Hi all,
I recently wrote a vb.net app using oledb to
an access database. When I inserted new
rows in my datatable the identity column
was automatically created. This app used
an un-typed...
|
by: dbuchanan |
last post by:
Hello,
Here is the error message;
----------------------------
Exception Message:
ForeignKeyConstraint Lkp_tbl040Cmpt_lkp302SensorType requires the child
key values (5) to exist in the...
|
by: R.Manikandan |
last post by:
Hi
In my code, one string variable is subjected to contain more amount of
characters. If it cross certain limit, the string content in the
varabile is automatically getting truncated and i am...
|
by: rn5a |
last post by:
A Web Form has a TextBox within a DataGrid wherein users are expected
to enter only whole numbers. It should be validated so that the
TextBox doesn't remain blank or any non-numeric data is...
|
by: Jim |
last post by:
Hi guys,
I have an object which represents an "item" in a CMS "component" where
an "item" in the most basic form just a field, and a "component" is
effectively a table.
"item" objects can be...
|
by: Markw |
last post by:
I think this was recently asked but I was a little lost on the example that was used so I'm reasking it with an example I can understand.
Also forgive me for such a basic question but I really am...
|
by: Catalyst159 |
last post by:
I have a form which is used to calculate residential Floor Area Ratio (FAR). The form is structured into seven parts as follows:
Part A: Maximum FAR and Floor Area:
Part B: Gross Floor Area of...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
| |