Hi there, If I run "ipmitool bmc info" on any of my x86 boxes, i get
Im trying to figure out a way of getting the four values directly underneath the string "Aux Firmware Rev Info :" into their own variables as i need to evaluate each of them to get the overall firmware revision
Does anybody have any idea how i would get these 4 values (and there are always 4) into variables? would i have to put them in some sort of array.
any help or guidance on this would be greatly appreciated
PS: I can technically do this by doing a "tail -4 | head -1" operation, then a "tail -3 | head -1" etc etc ....but im assuming there is a more stable and effective way of doing this
suppose i have a file value where it returns 3 values
a=1 b=2 c=4
when i run it.
i am using this file in my shell script. how do i parse and get the value of a b and c? (3 Replies)
i'm new to shell scripting and have a problem please help me
in the script i have a nawk block which has a variable count
nawk{
.
.
.
count=count+1
print count
}
now i want to access the value of the count variable outside the awk block,like..
s=`expr count / m`
(m is... (5 Replies)
Hi,
I have a file like the following...
CUST=
DIR=
NULIST=
name=philps_123
How can i add values to each of these unassigned variables using a shell script?
say for eg: i have values for CUST as onida, dir as /dir/onida, NULIST as /tmp/onida_files. How can i add these values to... (11 Replies)
Hi Legends,
Please help me in solving the below:
I have the file size and file name using `ls` and awk command.
ls -ltr *.pf |awk '{print $5, $9}'
2000003072 ABC.pf
2000003072 DEF.pf
2000003072 GHI.pf
56000588 JKL.pf
2000003072 MNO.pf
2000003072 PQR.pf
Now, I want to take the... (3 Replies)
Hi! This might be a simple thing, but I'm struggling to assign values to variables from the file.
I've the following values stored in the file.. It consists of only two rows..
10
20
I want to assign the first row value to variable "n1" and the second row value to variable "n2"..
That is ... (3 Replies)
Hello,
I'm very new to Linux, and I have a question, I'm hoping you could help me with. :)
I have created a file called subject, contains this code:
#!/bin/bash
read -p "Student Name: " NAME
read -p "Student ID: " ID
read -p "Address: " ADDRESS
I'm to create another file called... (7 Replies)
I have a file containing multiple values, some of them are pipe separated which are to be read as separate values and some of them are single value all are these need to store in variables.
I need to read this file which is an input to my script
Config.txt
file name, first path, second... (7 Replies)
I have a file say "SAMPLE.txt" with following content,
P1
10,9:6/123456
P2
blah blah
P1
10,9:5/98765
P2
blah
blah
P1
blah blah
P2
I want a output file say "RESULT.txt" as,
Value1:123456
Value2:98765
Value3:NULL (17 Replies)
so i've been used to doing it this way:
SVAL=$(echo "7 3 2 38 3" | awk '{print $2}')
4VAL=$(echo "4:21:N:3" | awk -F":" '{print $4}')
I know there's a way to do it by putting the value in an array and assigning it that way. but i'm not sure how to do it efficiently. any ideas? i dont... (9 Replies)
Here is my input
# MANIFEST.MF
Manifest-Version: 1.0
Build-Jdk: 1.6.0
Built-By: CM_TEAM
Build_SvnRev: 662789
Build_Number: 13.0.0.0-JDK8
Build_Date: Wed 04/05/2017-20:48:19.17
Archiver-Version: Plexus Archiver
Created-By: Apache Maven 3.1.0
Here is the expected output:... (4 Replies)
Discussion started by: kchinnam
4 Replies
LEARN ABOUT DEBIAN
device::usb::pcsensor::hidtemper::device
Device::USB::PCSensor::HidTEMPer::Device(3pm) User Contributed Perl Documentation Device::USB::PCSensor::HidTEMPer::Device(3pm)
Device::USB::PCSensor::HidTEMPer::Device - Generic device class
VERSION
Version 0.02
SYNOPSIS
None
DESCRIPTION
This module contains a generic class that all HidTEMPer devices should inherit from, thereby keeping the implemented methods consistent and
making it possible to use the same code to contact every supported device.
CONSTANTS
o CONNECTION_TIMEOUT
USB communication timeout, specified in milliseconds.
METHODS
o new( $usb_device )
Creates a new generic Device object.
o identifier()
This method is used to acquire the numerical value representing the device type identifier.
o internal()
Returns the corresponding Sensor object representing the internal sensor connected to the device. If the device does not have an
internal sensor undef is returned.
o external()
Returns the corresponding Sensor object representing the external sensor connected to the device. If the device does not have an
external sensor undef is returned.
o init()
Empty method that should be implemented in order to be able to initialize a object instance.
DEPENDENCIES
This module internally includes and takes use of the following packages:
use Carp;
use Device::USB;
use Device::USB::Device;
This module uses the strict and warning pragmas.
BUGS
Please report any bugs or missing features using the CPAN RT tool.
FOR MORE INFORMATION
None
AUTHOR
Magnus Sulland < msulland@cpan.org >
ACKNOWLEDGEMENTS
None
COPYRIGHT & LICENSE
Copyright (c) 2010 Magnus Sulland
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.10.1 2010-07-24 Device::USB::PCSensor::HidTEMPer::Device(3pm)