Unless you're using a really new ksh, numeric comparison doesn't work on numbers with decimal points.
This is most definitely not an efficient way to do it! If you have ksh available, try it. Otherwise, better ways might involve transforming the number into something without decimal places so the shell can handle it natively. Perhaps if I knew where this number was coming from and what you were using it for...
Hello all
Im trying to write one liner that will show me results only if the result of the expression is greater then 0
For example:
I do :
find . -name "*.dsp" | xargs grep -c SecurityHandler
the result are :
./foo/blah/a.dsp:0
./foo/blah1/b.dsp:1
./foo/blah2/c.dsp:2... (1 Reply)
This be the latest in my problems sorting through router logs... I'm half way there on a problem, but I've hit the limitation of my knowledge
Got some router interface log files of type
router01:GigabitEthernet9/24 is up, line protocol is up (connected)
router01: 0 input errors, 0 CRC, 0... (7 Replies)
Hi all,
I have a tab-delimited text file of size 10Mb. I am trying to count the number of lines using,
grep -c . sample.txtor
wc -l < sample.txt or
awk 'END {print NR}' sample.txtAll these commands shows the count as 1, which means they are reading only the first header line of the file.... (3 Replies)
HI,
I have one file which is as below
cat /var/tmp/test1 | awk '{ print $3}'|grep -v affected
Data
----------
200.4
. The above 200 value is changable by the database script.
Now I need a script that checks the value 200.4 and the script shoud give out put if value is more than 225 (2 Replies)
data:
hello mr smith 400 you all ok?
hello mrs. smith 700 you all ok?
hello mr. everyone 150 you all ok?
hello mr. you all 199 im lad you are ok
using egrep, how can i grep out only lines that have a number greater than 250?
cat data | egrep .....
can't use awk here. i was... (7 Replies)
i'm aware awk can do what i'm trying to do here. but i cant use awk in this scenario given the circumstance of this box.
but i need to check if a number is a certain column is over a certain value, say for instance, 20.
data:
| 12 | 19 | 2000 | 9029333 |... (11 Replies)
Hello,
I am newbie to bash scripting. Could someone help me with the following.
I have log file with output as shown below
**************************LOG*************************
11/20/2013 9:11:23.64 Pinging xx.xx.xx.xx with 32 bytes of data:
11/20/2013 9:11:23.64 Reply from xx.xx.xx.xx:... (4 Replies)
please let me know how to construct if then else by comparing two numbers if it is greater than 10000. I need to do some specific task executed.
can you help me out in shell scripting plz. (6 Replies)
Discussion started by: ramkumar15
6 Replies
LEARN ABOUT HPUX
hppacaddd
hppac(3X)hppac(3X)NAME
hppac: HPPACADDD(), HPPACCMPD(), HPPACCVAD(), HPPACCVBD(), HPPACCVDA(), HPPACCVDB(), HPPACDIVD(), HPPACLONGDIVD(), HPPACMPYD(), HPPAC-
NSLD(), HPPACSLD(), HPPACSRD(), HPPACSUBD() - HP 3000-mode packed-decimal library
SYNOPSIS DESCRIPTION
This set of calls invokes the library functions for emulating 3000-mode (MPE V/E) packed-decimal operations. These functions are in
library which is searched when the option is used with or ld(1).
Performs packed-decimal addition.
Compares two packed-decimal numbers.
Converts an ASCII representation to packed-decimal.
Converts a binary representation to packed-decimal.
Converts a packed-decimal number to ASCII.
Converts a packed-decimal number to binary.
Performs packed-decimal division.
Performs packed-decimal division (alternate routine).
Performs packed-decimal multiplication.
Performs a packed-decimal normalizing left shift.
Performs a packed-decimal left shift.
Performs a packed-decimal right shift.
Performs packed-decimal subtraction.
For all operations, the value returned in the variable to which the compcode argument points is one of the following values of type
Result > 0 or operand1 > operand2
Result < 0 or operand1 < operand2
Result == 0 or operand1 == operand2
For all operations, the value returned in the variable to which the pacstatus argument points is one of the following values of type Their
meanings are intended to be obvious:
AUTHOR
The HPPAC library was developed by HP.
SEE ALSO
PA-RISC Systems Only hppac(3X)