Sponsored Content
Top Forums Shell Programming and Scripting Number comparison in ksh on mac with -lt is giving wrong answer Post 302816653 by Corona688 on Tuesday 4th of June 2013 11:19:08 AM
Old 06-04-2013
< > are redirection in shell, not greater-than less-than.

Testing in bash, -lt works fine, so I believe you are just hitting the limits on integer size in your shell.
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

mailx and awk- didn't find an answer KSH

Hi folks, My input file's content: You are line1 You are line2 You are line3 etc... I need to write a script that for every line, it will send an e-mail and the body will hold the line: Output(The e-mail that will be sent): First e-mail: To: aaa Subject: bbb Body:You are line1... (4 Replies)
Discussion started by: hellsd
4 Replies

2. Shell Programming and Scripting

Script giving wrong results....

hi, I have this script which gives me the result... #! /usr/bin/sh set -x cd /home/managar a=1 while true do if then echo " File log.txt exists in this directory " exit 0 fi echo " File has not arrived yes..." sleep 3 let a=a+1 if then (1 Reply)
Discussion started by: mgirinath
1 Replies

3. AIX

Shared memory giving wrong value

Hi , I am working on AIX 5.3 server.I have small program which stores the from database to a particaular shared memory.But while retreiving the valus from the same shared memory, i am getting wrong values. Please help..... (1 Reply)
Discussion started by: ajaysahoo
1 Replies

4. UNIX for Dummies Questions & Answers

AWK command giving wrong input

Hi all, I have a problem with qwk command. i have to check process status and for that i am using command prstat -mvL 1 1 and it gives me the entire output but when i use this command with awk like this: prstat -mvL 1 1 | awk -F" " '{print $1,$15}' to get first and 15th arguments. ... (3 Replies)
Discussion started by: usha rao
3 Replies

5. Shell Programming and Scripting

Sort command giving wrong output

Hi all, I have a problem with sort command. i have a file which looks like this: "file1 1073 java/4 1073 java/180 1073 java/170 1073 java/176 1073 java/167 1073 java/40 1073 java/33 1073 java/136 28988 java/76 28988 java/73 28988 java/48 28988 java/26" and i want to sort... (8 Replies)
Discussion started by: usha rao
8 Replies

6. Shell Programming and Scripting

tr command giving wrong output

Hi All, i have a file which have many fields delimited by ,(comma) now i have to show only few fields and not all. the sample text file looks like this: TYPE=SERVICEEVENT, TIMESTAMP=05/06/2009 11:01:40 PM, HOST=sppwa634, APPLICATION=ASComp, FUNCTION=LimitsService, SOU... (8 Replies)
Discussion started by: usha rao
8 Replies

7. UNIX for Advanced & Expert Users

xbindkeys giving wrong mapping information

Hello, I'm having a problem with xbindkeys giving the wrong mapping information, hence I can't get it work at all when trying new mappings from this machine. From another computer, I have some definitions for xbindkeys (made with xbindkeys-config). These key codes work correctly on this... (0 Replies)
Discussion started by: Narnie
0 Replies

8. Shell Programming and Scripting

If && command giving wrong output

Hi All, I am trying to run a script which will search for 2 strings(stopped,started) in a text file and echo an output depending on below condition -bash-3.2$ cat trial1.txt v ggg f -bash-3.2$ cat trial1.sh VAR9=` grep 'stopped' /tmp/trial1.txt` VAR10=` grep 'started'... (4 Replies)
Discussion started by: srkmish
4 Replies

9. UNIX for Dummies Questions & Answers

VxWorks RTC time giving wrong value at random times

I am seeing a scenario where in if the TIMEZONE environment variable value is set to nothing i.e. putenv "TIMEZONE=" the hardware clock is +1 to software clock.Pasted below the results displayed: -> envShow (global environment) 0: TSC_TIME_FROM_RESET=420150.971529 seconds 1:... (0 Replies)
Discussion started by: snehavb
0 Replies
Testing.randomValue(3kaya)				       Kaya module reference					Testing.randomValue(3kaya)

NAME
Testing::randomValue - Return a random value SYNOPSIS
Arbitrary randomValue( Int depth=10 ) ARGUMENTS
depth This parameter gives the maximum depth of recursion to guarantee that the value has finite size. The default value is 10 and can usu- ally be omitted. DESCRIPTION
Return a random value of arbitrary type. AUTHORS
Kaya standard library by Edwin Brady, Chris Morris and others (kaya@kayalang.org). For further information see http://kayalang.org/ LICENSE
The Kaya standard library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License (version 2.1 or any later version) as published by the Free Software Foundation. RELATED
Testing.randomArray(3kaya) Testing.randomChar(3kaya) Testing.randomFloat(3kaya) Testing.randomInt(3kaya) Testing.randomString(3kaya) Kaya October 2012 Testing.randomValue(3kaya)
All times are GMT -4. The time now is 01:52 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy