11-02-2008
Hi All,
Is there is any soloution using array.
please let me know
Thanks
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi, I am in ksh88
I am trying to get the result of the calculation using 3 variables:
TOTAL
CAPACITY
and get the following error:
$DB_CAPACITY=(( $DB_SIZE * 100 / $TOTAL ))
ksh: syntax error: `((' unexpected
I cannot figure out what am I doing wrong... Thanks for any help -A (2 Replies)
Discussion started by: aoussenko
2 Replies
2. Shell Programming and Scripting
hi
$lp_count = 25265531
$num_reads = 25280826
result=`echo "scale=2; $lp_count/$num_reads * 100" | bc`
echo $result
------------------------------------------------------
o/p:
99.00
------------------------------------------------------
desired:
99.93 (2 Replies)
Discussion started by: ali560045
2 Replies
3. Shell Programming and Scripting
Hi
am calculating the percentage of the pass and fail.
Pass:
echo `echo 1498*100/1667| bc`%
fail:
echo `echo 169*100/1667 | bc`%
for this am getting
PASS= 89%
fail =10 %
I need to fetch the exact decimal percentage like
PASS = 89.8 %
FAIL= 10.2 %
Please advice me (3 Replies)
Discussion started by: bobprabhu
3 Replies
4. Shell Programming and Scripting
Hi All
I want to make summery for
Date=245Duration=545 ... (1 Reply)
Discussion started by: nalakaatslt
1 Replies
5. UNIX for Advanced & Expert Users
I have a file that reads File (X.txt)
Contents of record 1:
rdrDESTINATION_ADDRESS (String) "91 971502573813"
rdrDESTINATION_IMSI (String) "000000000000000"
rdrORIGINATING_ADDRESS (String) "d0 movies"
rdrORIGINATING_IMSI (String) "000000000000000"
rdrTRAFFIC_EVENT_TIME... (0 Replies)
Discussion started by: magedfawzy
0 Replies
6. Shell Programming and Scripting
I have a file which has 3 coloumns emp_name, Joining_date, Designation.
abc 12/1/2001 SSE
def 2/25/2007 SE
ghi 3/18/2009 SA
abc 8/1/2008 SSE
def 2/13/2007 SE
ghi 3/24/2005 SA
I need to find out the emp who has been in the company for longest period(Till date).
Can I have any... (3 Replies)
Discussion started by: siba.s.nayak
3 Replies
7. Shell Programming and Scripting
Could someone till me what this calculation really means
let foo=`date "+(1%H-106)*60+1%M-100"` bar=foo+1440 (4 Replies)
Discussion started by: freddie999
4 Replies
8. Shell Programming and Scripting
for i in `lsvg`
do
echo "VG Name:" $i
echo "Total VG Size:"
lsvg $i |grep "TOTAL PPs:" |awk '{print $7}' | cut -c2-
echo "Free VG Size:"
lsvg $i |grep "FREE PPs:" | awk '{print $7}' | cut -c2-
done
The PP Sizes are in MB. I like to have the sizes in GB.
Also, I like to have the... (14 Replies)
Discussion started by: Daniel Gate
14 Replies
9. Shell Programming and Scripting
pcmpath query device |awk 'BEGIN{print "TYPE\tDEVICE NAME\tSERIAL\tSIZE\tHOSTNAME"}
/DEVICE/ {
disk=$5
printf "%s\t", $7
printf "%s\t", disk
getline; printf "%s\t", substr($2, length($2)-3)
("bootinfo -s " disk) | getline; printf... (3 Replies)
Discussion started by: Daniel Gate
3 Replies
10. Shell Programming and Scripting
Hi, i have a large file like this:
Contig1 1 5
Contig1 2 4
Contig1 3 3
Contig1 4 5
Contig1 5 3
Contig1 6 4
Contig2 1 3
Contig2 2 7
Contig2 3 2
Contig2 4 9
Contig2 5 10
Contig2 6 3
Contig2 7 7
Contig2 8 2
Contig2 9 7
Contig2 10 5
contig1 2 4
contig1 3 3
contig1 4 5 (3 Replies)
Discussion started by: the_simpsons
3 Replies
LEARN ABOUT DEBIAN
check_multi
CHECK_MULTI(8) System Administration Utilities CHECK_MULTI(8)
NAME
check_multi - nagios plugin to combine multiple service checks in one run
DESCRIPTION
Usage: check_multi -f <config file> [-n name] [-t timeout] [-T TIMEOUT]
[-r level] [-l libexec_path] [-s option=value]
check_multi [-h | --help] [-hh extended help] [-hhh complete help] check_multi [-v | --verbose] check_multi [-V | --version]
[ more infos on http://my-plugin.de/check_multi ]
Common options: -f, --filename
config file which contains commands to be executed multiple files can be specified serially if filename is a directory, all '.cmd'
files will be taken (file format follows nrpe style: command[tag]=plugin command line)
-n, --name
multi plugin name (shown in output), default:
-r, --report <level>
specify level of details in output (level is binary coded, just sum up all options) default:13 see more details with extended help
option -hh
-s, --set <option>=<value>
<KEY>=<VALUE> - set multi variable $<KEY>$ to <VALUE> see more details with complete help option -hhh
-t, --timeout
timeout for one command, default:11
-T, --TIMEOUT
TIMEOUT for all commands, default:60
-l, --libexec
path to plugins, default:/usr/lib/nagios/plugins
-h, --help
print detailed help screen (extended help with -hh, complete help with -hhh)
-v, --verbose
prints debug output (multiple -v extend debug level)
-V, --version
print version information
Extended command line - command file options also available on command line: -x, --execute "command [ tag ] = check_xyz" -i, --instant
"tag" -y, --inventory -w, --warning <expression> -c, --critical <expression> -u, --unknown <expression> -o, --ok <expression>
check_multi 0.26-1 November 2011 CHECK_MULTI(8)