Sponsored Content
Top Forums Shell Programming and Scripting Need help with the logic for ksh script Post 303001433 by desant on Thursday 3rd of August 2017 12:58:03 PM
Old 08-03-2017
Need help with the logic for ksh script

Hi guys
I am having hard time to figure out the logic for the following problem:

I have a line of sorted numbers , for example 19 34 44 49 64
I am trying to find the way to determine which two numbers are in between the number I have specified.

for example if 34 is specified 19 and 44 should be returned.

Thanks a lot for any help and ideas

Moderator's Comments:
Mod Comment Please use CODE tags as required by forum rules!

Last edited by RudiC; 08-03-2017 at 02:46 PM.. Reason: Added CODE tags.
 

2 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

import var and function from ksh script to another ksh script

Ih all, i have multiples ksh scripts for crontab's unix jobs they all have same variables declarations and some similar functions i would have a only single script file to declare my variables, like: var1= "aaa" var2= "bbb" var3= "ccc" ... function ab { ...} function bc { ... }... (2 Replies)
Discussion started by: wolfhurt
2 Replies

2. Shell Programming and Scripting

Need help with the logic for ksh script

Hi guys I am having hard time to figure out the logic for the following problem: I have a line of sorted numbers , for example 19 34 44 49 64 I am trying to find the way to determine which two numbers are in between the number I have specified. for example if 34 is specified 19 and 44... (1 Reply)
Discussion started by: desant
1 Replies
times(1)							   User Commands							  times(1)

NAME
times - shell built-in function to report time usages of the current shell SYNOPSIS
sh times ksh times DESCRIPTION
sh Print the accumulated user and system times for processes run from the shell. ksh Print the accumulated user and system times for the shell and for processes run from the shell. On this man page, ksh(1) commands that are preceded by one or two * (asterisks) are treated specially in the following ways: 1. Variable assignment lists preceding the command remain in effect when the command completes. 2. I/O redirections are processed after variable assignments. 3. Errors cause a script that contains them to abort. 4. Words, following a command preceded by ** that are in the format of a variable assignment, are expanded with the same rules as a variable assignment. This means that tilde substitution is performed after the = sign and word splitting and file name genera- tion are not performed. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ SEE ALSO
ksh(1), sh(1), time(1), attributes(5) SunOS 5.11 15 Apr 1994 times(1)
All times are GMT -4. The time now is 05:30 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy