Begginer alert!!
I have just started learning perl and have got stuck. I need to initialize a hash array with values from a list. I've been told to do this using a split command, but its just not happening.
Here is the script and output:
SCRIPT:
#!/bin/perl
system("clear");
... (5 Replies)
Dear Friends,
I am doing a sh shell script , But I dont have any idea how to read value from user Keyboard and store them to an array .. Is it possible or not I am not also sure in sh shell script ?
EX:-
#! /bin/sh
read DATA
echo "DATA -" $DATA
echo "DATA -" $DATA
echo "DATA... (7 Replies)
Hi all,
I wrote a script that reads inputs from user and store in array named "input". The number of elements in the array is not fixed - determined only after user exit the while loop that reads the array values :
x=1
echo "Enter first value"
read input
while } != "exit" ]
do
... (1 Reply)
i have a file called file.txt having the following entries.
2321
2311
2313
4213
i wnat to store these values in a list and i want to iterate the list using loop and store it in another list (1 Reply)
Hello!
Im trying to divid the numbers inputed by <STDIN> by 2.
This is what I have:
print "The input array divided by 2 is as follows:\n"; foreach ((@userArray)/2) {print}
But it is not dividing by 2?
Any help is valuable!!
Ben (3 Replies)
Hi,
cut -d: -f1,3 /etc/group >rpt.out
I have a doubt in perl. right i am getting list of group user id into rpt.out file. instead i need to store it as an array in perl script. could you please tell me how can i get list of user into an array in perl script..
thanks in advance. (1 Reply)
Folks,
I have written one script for following condition by referring some of online post in this forum. Please correct it if I'm missing something in it. (OS: AIX 5.3)
List the idle user. (I used whoidle command to list first 15 user and get username, idle time, pid and login time).... (4 Replies)
What I am doing is creating a top menu, which a user will select a choice with a number entry. That number corresponds to a string in an array. I then want to assign that response to another array I've already declared.
For example:
#!/bin/bash
colors=(red blue yellow)
red=(cherry fire)... (2 Replies)
Hello,
I am writing a script that requires the user to enter a string of numbers:
ex: 134 345 865 903
This command only allows for one variable to be entered:
set "var" = $<
and than once I got the array I want to change it to a list with each input on a different line:
... (1 Reply)
hi,
total newbie to shell scripting and wondering if some of you guru's can give me a hand on a problem I'm trying to solve.
The tmplsnr.a file contains
LSNR_51526
db1
db2
LSNR_51527
db3
db4
db5
Summary - depending on which db is set, the script will start the relevant listener... (5 Replies)
Discussion started by: mingy10
5 Replies
LEARN ABOUT CENTOS
hpitree
hpitree(1) OpenHPI hpitree(1)NAME
hpitree - A openhpi sample application that shows in details the resources (rpt's) and resources' manamegement instruments (rdr's) data
structures of the managed openHPI complex.
SYNOPSIS
hpitree [-D nn] [-N host[:port]] [-C <cfgfile>] [-acdiorsw ] [-n nn] [-x] [-h]
hpitree [--domain=nn] [--host=host[:port]] [--cfgfile=file] [--all] [--controls] [--rdrs] [--inventories] [--rpts]
[--sensors] [--watchdogs] [--overview] [--resource=nn] [--debug] [--help]
DESCRIPTION
hpitree walks the Resource Presence Table (RPT) of the managed openHPI complex, and displays in details the resources (rpt's) and
resources' management instruments (rdr's) data structures.
If no domain or host is selected, hpitree uses the default domain as specified in the openhpiclient.conf file.
OPTIONS
(No Option) Display all rpts and rdrs
Help Options:
-h, --help
Show help options
Application Options:
-a, --all
Display all rpts and rdrs (default)
-r, --rpts
Display only rpts
-d, --rdrs
Display rdr records
-o, --overview
Display system overview: rpt & rdr headers
-s, --sensors
Display only sensors
-c, --controls
Display only controls
-w, --watchdogs
Display only watchdogs
-i, --inventories
Display only inventories
-n nn, --resource=nn
Display only resource nn and its topology
-D nn, --domain=nn
Select domain id nn
-X, --debug
Display debug messages
-N "host[:port]", --host="host[:port]"
Open session to the domain served by the daemon at the specified URL (host:port). This option overrides the OPENHPI_DAEMON_HOST and
OPENHPI_DAEMON_PORT environment variables. If host contains ':' (for example IPv6 address) then enclose it in square brackets. For
example: "[::1]" or "[::1]:4743".
-C "file", --cfgfile="file"
Use passed file as client configuration file. This option overrides the OPENHPICLIENT_CONf environment variable.
SEE ALSO
hpi_shell
hpialarms hpifan hpipower hpithres
hpidomain hpigensimdata hpireset hpitop
hpiel hpiiinv hpisensor hpiwdt
hpievents hpionIBMblade hpisettime hpixml
ohdomainlist ohhandler ohparam
AUTHORS
Authors of this man page:
Peter D Phan (pdphan@users.sourceforge.net)
Ulrich Kleber (ulikleber@users.sourceforge.net)
Anton Pak (avpak@users.sourceforge.net)
3.2.1 2011-09-20 hpitree(1)