Sponsored Content
Operating Systems Linux Red Hat please help me in if command problem Post 302485054 by citaylor on Tuesday 4th of January 2011 05:03:55 AM
Old 01-04-2011
You may have to convert them to proper numbers:
Code:
X="`echo $a | awk -F. '{ print ($1*1000)+($2*100)+($3*10)+$4 }'`"
Y="`echo $b | awk -F. '{ print ($1*1000)+($2*100)+($3*10)+$4 }'`"
if [ $X -ge $Y ]; then....

 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

problem with who command

Sorry for my poor english. Unix is SCO ODT ver 3.0 Mine problem is : when I login via some terminal emulator and type : who am i I see information like this : username ttyp02 Feb 28 09:53 after logoff and type who command (from some other terminal) I see that ttyp02 is still... (2 Replies)
Discussion started by: bane_yu
2 Replies

2. UNIX for Dummies Questions & Answers

Problem with ps command??

I have a problem to.... (1).List the number of unique users that has active processes. (2).List the number of active processes for each of the users in (1). (3).Determine total memory usage for each user. Help me please....thank you. Best... (2 Replies)
Discussion started by: robocup
2 Replies

3. Shell Programming and Scripting

problem with dd command or maybe AFS problem

Hi, folks. Sorry for bothering, but maybe someone could help me please. The problem is the following: there is some script that copies files from local file system to AFS. The copying is performed with dd command. The script copies data into some AFS volumes. The problem appeared with one... (0 Replies)
Discussion started by: Anta
0 Replies

4. UNIX for Dummies Questions & Answers

problem with output of find command being input to basename command...

Hi, I am triying to make sure that there exists only one file with the pattern abc* in path /path/. This directory is having many huge files. If there is only one file then I have to take its complete name only to use furter in my script. I am planning to do like this: if ; then... (2 Replies)
Discussion started by: new_learner
2 Replies

5. Solaris

problem with ps command

Hi all I use to run sql loader inside a script with usename and password written in syntax. Now when I use 'ps' command to know about the status of loading, it also shows username and password that I don't want to share with someone who is sitting with me. If you have any idea except encryption... (1 Reply)
Discussion started by: sanjay1979
1 Replies

6. Shell Programming and Scripting

Problem with command tr

Hello, excuse me for my english, i'm a french man. I have a problem with the command tr in applescript (with the accent...in french we have a lot of accents), i have read that is a problem with the version 10.5 of leopard then i would want to download the version 10.4 of universal binary of tr... (1 Reply)
Discussion started by: protocomm
1 Replies

7. Shell Programming and Scripting

Problem with mv command and touch command

Hi guys, first of all I would say that this is my first time I write in a Forum. I've read the "forum rules" and I hope i will respect them. I searched everywhere for the solution of my problem but I didn't find anything. Here my problem: I'm using a sap job scheduler: in a particular job... (7 Replies)
Discussion started by: Antcam
7 Replies

8. Shell Programming and Scripting

Problem with tr command

Hi friends, Today I found one strange behaviour of the tr command. I used the following command: echo "NEE"|tr Sometimes it was giving "nee" as ouput . sometimes it was giving "NEE" as output. Finally I used the below code: echo "NEE"|tr "" "" ... and it gave me the correct... (17 Replies)
Discussion started by: neelmani
17 Replies

9. AIX

I'm facing problem with rpm command, when running the command and appears this error:

exec(): 0509-036 Cannot load program /usr/opt/freeware/bin/rpm because of the following errors: 0509-022 Cannot load module /opt/freeware/lib/libintl.a(libintl.so.1). 0509-150 Dependent module /opt/freeware/lib/libiconv.a(shr4.o) could not be loaded. 0509-152 Member... (4 Replies)
Discussion started by: Ohmkar
4 Replies
BBCOMBOTEST.CFG(5)						File Formats Manual						BBCOMBOTEST.CFG(5)

NAME
bbcombotest.cfg - Configuration of bbcombotest tool SYNOPSIS
$BBHOME/etc/bbcombotest.cfg DESCRIPTION
bbcombotest(1) uses it's own configuration file, $BBHOME/etc/bbcombotest.cfg Each line in this file defines a combined test. FILE FORMAT
Each line of the file defines a new combined test. Blank lines and lines starting with a hash mark (#) are treated as comments and ignored. The configuration file uses the hostnames and testnames that are already used in your Xymon bb-hosts file. These are then combined using normal logical operators - "||" for "or", "&&" for "and" etc. A simple test - e.g. "Web1.http" - results in the value "1" if the "http" test for server "Web1" is green, yellow or clear. It yields the value "0" if it is red, purple or blue. Apart from the logical operations, you can also do integer arithmetic and comparisons. E.g. the following is valid: WebCluster.http = (Web1.http + Web2.http + Web3.http) >= 2 This test is green if two or more of the http tests for Web1, Web2 and Web3 are green. The full range of operators are: + Add - Subtract * Multiply / Divide % Modulo | Bit-wise "or" & Bit-wise "and" || Logical "or" && Logical "and" > Greater than < Less than >= Greater than or equal <= Less than or equal == Equal There is currently no support for a "not" operator. If you need it, use the transcription "(host.test == 0)" instead of "!host.test". NB: All operators have EQUAL PRECEDENCE. If you need something evaluated in a specific order, use parentheses to group the expressions together. If the expression comes out as "0", the combined test goes red. If it comes out as non-zero, the combined test is green. Note: If the expression involves hostnames with a character that is also an operator - e.g. if you have a host "t1-router-newyork.foo.com" with a dash in the hostname - then the operator-character must be escaped with a backslash '' in the expression, or it will be interpreted as an operator. E.g. like this: nyc.conn = (t1-router-nyc.conn || backup-router-nyc.conn) EXAMPLE
WebCluster.http = (Web1.http || Web2.http) AppSrvCluster.procs = (AppSrv1.conn && AppSrv1.procs) || (AppSrv2.conn && AppSrv2.procs) Customer.cluster = WebCluster.http && AppSrvCluster.procs The first line defines a new test, with hostname "WebCluster" and the columnname "http". It will be green if the http test on either the "Web1" or the "Web2" server is green. The second line defines a "procs" test for the "AppSrvCluster" host. Each of the AppSrv1 and AppSrv2 hosts is checked for "conn" (ping) and their "procs" test. On each host, both of these must be green, but the combined test is green if that condition is fulfilled on just one of the hosts. The third line uses the two first tests to build a "double combined" test, defining a test that shows the overall health of the system. FILES
$BBHOME/etc/bbcombotest.cfg SEE ALSO
bbcombotest(1) Xymon Version 4.2.3: 4 Feb 2009 BBCOMBOTEST.CFG(5)
All times are GMT -4. The time now is 11:57 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy