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)