Sponsored Content
Top Forums Shell Programming and Scripting Java - Arrays.binarySearch function equivalent in awk Post 302853377 by spacebar on Friday 13th of September 2013 10:10:46 PM
Old 09-13-2013
Check out this info there are examples for multiple languages:
Binary search - Rosetta Code
 

10 More Discussions You Might Find Interesting

1. Linux

Equivalent function of [ kbhit() ] In TURBO C

ANy one knows equivalent function of which in Turbo C. I want to Execute Certain loop until any key is pressed. i.e while(!kbhit) { ---------- ---------- } This code work fine in DOS but NOt in LINUX i try to use but not getting the expected result ... (0 Replies)
Discussion started by: niravuchat
0 Replies

2. HP-UX

create thread C with JNI function with JAVA

Hello, J create a thread C with a JNI function via JAVA. J have the following message (but not in each time): Someone has an idea ? Thank. Unexpected Signal : 4 occurred at PC=0x78C103E0 Function= Library=(N/A) NOTE: We are unable to locate the function name... (0 Replies)
Discussion started by: AUBERT
0 Replies

3. Shell Programming and Scripting

shell: creating different arrays based on function argument

hi, I was wondering if there was a good way to create an array within a function, where the name is based on a passed argument? I tried this: _____________________________ func(){ #take in 1st arg as the arrayname arrayName=$1 let i=0 while read line do arrayName=${line} let i+=1... (5 Replies)
Discussion started by: nix21
5 Replies

4. Programming

equivalent function for wherey( ) ??

what is the equivalent function for wherey( ) ?? That is to return the current column position? (2 Replies)
Discussion started by: rockgal
2 Replies

5. Shell Programming and Scripting

Bash equivalent of perl's pack function ?

Is there an equivalent of perl's pack function in bash ? Or in other words, how can I achieve the same thing in bash ? Much appreciated. (1 Reply)
Discussion started by: NewDeb
1 Replies

6. Shell Programming and Scripting

shell script equivalent for tcl function

Hello, I need experts help in converting the below tcl function to korn shell function equivalent. proc lsNetMaskToBits {mask} { set dw ; # Top N bits set set dw 0x ; # Make sure it's hexadecimal, else XOR fails. puts "lsNetMaskToBits dw $dw" set dw ; # Complement => low 32-N bits... (1 Reply)
Discussion started by: JackMelson
1 Replies

7. Programming

Equivalent function for matlab on scilab

Hello everyone, i need help with this , i need the equivalent matlab funtion tf(x,y) in scilab and what do u recommend best from those three for a linux user (i need it for Control theory): 1-matlab 2-Scilab 3-Octave thank you for your time (0 Replies)
Discussion started by: abu_malek
0 Replies

8. Shell Programming and Scripting

Recursive function and arrays

I have the following function in a bash script that fails to return the sorted array. I think the problem lies in the recursion not correctly passing the arrays, but I can't tell what I'm doing wrong. Anyone see the problem? function quicksort () { local array=( `echo "$1"` ) local... (7 Replies)
Discussion started by: tkg
7 Replies

9. Programming

STL algorithm merge() function to concatenate char arrays

When the STL generic algorithm's merge() function is used to merge two char arrays, the output is not as expected. Below is the program I tried with. #include <iostream> #include <algorithm> #include <cstring> #include <deque> #include <iterator> using namespace std; int main() { ... (3 Replies)
Discussion started by: royalibrahim
3 Replies

10. UNIX for Dummies Questions & Answers

Shell equivalent of matlab fwrite function

I have some matlab code that sends the serial port elements of an array using matlab's fwrite function, e.g.: fwrite(s, , 'uchar'); What would be a unix shell equivalent? E.g., after successfully accessing the port using instructions here: Simple terminal serial port program for Linux/MacOSX... (3 Replies)
Discussion started by: darwin_886
3 Replies
VCONSOLE.CONF(5)						   vconsole.conf						  VCONSOLE.CONF(5)

NAME
vconsole.conf - configuration file for the virtual console SYNOPSIS
/etc/vconsole.conf DESCRIPTION
The /etc/vconsole.conf file configures the virtual console, i.e. keyboard mapping and console font. The basic file format of the vconsole.conf is a newline-separated list environment-like shell-compatible variable assignments. It is possible to source the configuration from shell scripts, however, beyond mere variable assignments no shell features are supported, allowing applications to read the file without implementing a shell compatible execution engine. Note that the kernel command line options vconsole.keymap=, vconsole.keymap.toggle=, vconsole.font=, vconsole.font.map=, vconsole.font.unimap= may be used to override the console settings at boot. Depending on the operating system other configuration files might be checked for configuration of the virtual console as well, however only as fallback. OPTIONS
The following options are understood: KEYMAP=, KEYMAP_TOGGLE= Configures the key mapping table of for they keyboard. KEYMAP= defaults to us if not set. The KEYMAP_TOGGLE= can be used to configured a second toggle keymap and is by default unset. FONT=, FONT_MAP=, FONT_UNIMAP= Configures the console font, the console map and the unicode font map. FONT= defaults to latarcyrheb-sun16. EXAMPLE
Example 1. German keyboard and console /etc/vconsole.conf: KEYMAP=de-latin1 FONT=latarcyrheb-sun16 SEE ALSO
systemd(1), loadkeys(1), setfont(8), locale.conf(5) AUTHOR
Lennart Poettering <lennart@poettering.net> Developer systemd 10/07/2013 VCONSOLE.CONF(5)
All times are GMT -4. The time now is 08:44 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy