Sponsored Content
Full Discussion: Bash INKEY$ function...
Top Forums UNIX for Dummies Questions & Answers Bash INKEY$ function... Post 302785605 by wisecracker on Tuesday 26th of March 2013 03:46:29 AM
Old 03-26-2013
Hi Corona688...

Thanks for the info...
One day I will become a coder... ;o)

I have used a derivative of it in the next stage of the AudioScope as a pseudo vertical shift control, so I thought I would let other people like me have it...
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Need assistance with bash function

Hi all! I need a little help with an imbedded fuction I am trying to write. What I am trying to do is go to a series of hosts and get the contents of an XML file, storing some of the data, along with the name of the host it was gathered from. My intent is to store this in an array for later... (1 Reply)
Discussion started by: _jade_
1 Replies

2. Shell Programming and Scripting

Need help in using power function in Bash

Hi, I would like to use a power function in Bash in an awk '{ } . e.g pow(2,3)=8 Any suggestion? I try to find online resources but most of them stated by using BC. Please advise. Thanks. (3 Replies)
Discussion started by: ahjiefreak
3 Replies

3. Shell Programming and Scripting

bash search function

I want to have a function with a similar interface: search *.cpp asdf that will search recursively all directories for *.cpp file, containing line 'asdf' inside. I tried this: function search { find . -name "$1" | xargs grep -li $2; } But it doesn't work all the time. For example, if i run it... (3 Replies)
Discussion started by: doze
3 Replies

4. Shell Programming and Scripting

[Bash]Function returning a boolean

Hello all, I would like to know if it is possible to return a the result of a boolean expression from a function like this function() { # some code return || } and what will be the return value ? Thank you for help. (6 Replies)
Discussion started by: dolphin06
6 Replies

5. Shell Programming and Scripting

In bash getting weird output from function ?

My script- result="" times() { echo "inside the times function" result=8 echo "Inside function $result" return $result } result=$(times) echo "the value is "$? echo "the value of result $result" when I run I get this, why the value still remain 0. $ ./func the value is 0 the value... (5 Replies)
Discussion started by: boy18nj
5 Replies

6. Shell Programming and Scripting

BASH function error

Hey everyone. I am currently testing my first function based BASH script. The ultimate goal is going to be moving logs from point A to point B (or if B is down, to point C). Part of this involves the following function: function testAlive{ ping -c 1 -q $1 } Now when I run ping -c... (1 Reply)
Discussion started by: msarro
1 Replies

7. Shell Programming and Scripting

Bash function

startvm() { startguest } Is there a way use one line to get this ? actually I want startvm=startguest (5 Replies)
Discussion started by: yanglei_fage
5 Replies

8. Shell Programming and Scripting

Yes or No selection within bash function

I need to add a selection within the bash function below and am having some trouble doing so. phox2b() { printf "\n\n" printf "What is the id of the patient getting Phox2B analysis : "; read id printf "Is this an intronic variant? Y/N "; read match_choice case... (5 Replies)
Discussion started by: cmccabe
5 Replies

9. Shell Programming and Scripting

Bash function, for BSD

I am putting this thread to shell-threads, because it is about how to make a function work properly. I need a hint for declaring a function right, it has been more than a year I did not work that straight with bash. So my aim is to turn off the eth0 (as it would be in linux, and bge0 in bsd ),... (2 Replies)
Discussion started by: 1in10
2 Replies

10. Shell Programming and Scripting

Bash function problem

I am trying to figure out why I am having a "problem" with some functions in a bash script I am running. The reason for air quoting is that the functions are working, they are just not displaying anything to screen when called from another function. Here's an example: function Create_Input {... (6 Replies)
Discussion started by: dagamier
6 Replies
DIFF(3) 						User Contributed Perl Documentation						   DIFF(3)

NAME
PDL::GSL::DIFF - PDL interface to numerical differentiation routines in GSL DESCRIPTION
This is an interface to the numerical differentiation package present in the GNU Scientific Library. SYNOPSIS
use PDL; use PDL::GSL::DIFF; my $x0 = 3.3; my @res = gsldiff(&myfunction,$x0); # same as above: @res = gsldiff(&myfunction,$x0,{Method => 'central'}); # use only values greater than $x0 to get the derivative @res = gsldiff(&myfunction,$x0,{Method => 'forward'}); # use only values smaller than $x0 to get the derivative @res = gsldiff(&myfunction,$x0,{Method => 'backward'}); sub myfunction{ my ($x) = @_; return $x**2; } FUNCTIONS
gsldiff() This functions serves as an interface to the three differentiation functions present in GSL: gsl_diff_central, gsl_diff_backward and gsl_diff_forward. To compute the derivative, the central method uses values greater and smaller than the point at which the derivative is to be evaluated, while backward and forward use only values smaller and greater respectively. gsldiff() returns both the derivative and an absolute error estimate. The default method is 'central', others can be specified by passing an option. Please check the GSL documentation for more information. Usage: ($d,$abserr) = gsldiff($function_ref,$x,{Method => $method}); Example: #derivative using default method ('central') ($d,$abserr) = gsldiff(&myf,3.3); #same as above with method set explicitly ($d,$abserr) = gsldiff(&myf,3.3,{Method => 'central'}); #using backward & forward methods ($d,$abserr) = gsldiff(&myf,3.3,{Method => 'backward'}); ($d,$abserr) = gsldiff(&myf,3.3,{Method => 'forward'}); sub myf{ my ($x) = @_; return exp($x); } BUGS
Feedback is welcome. Log bugs in the PDL bug database (the database is always linked from http://pdl.perl.org). SEE ALSO
PDL The GSL documentation is online at http://sources.redhat.com/gsl/ref/gsl-ref_toc.html AUTHOR
This file copyright (C) 2003 Andres Jordan <andresj@physics.rutgers.edu> All rights reserved. There is no warranty. You are allowed to redistribute this software documentation under certain conditions. For details, see the file COPYING in the PDL distribution. If this file is separated from the PDL distribution, the copyright notice should be included in the file. The GSL differentiation routines were written by David Morrison. FUNCTIONS
diff_central Signature: (double x(); double [o] res(); double [o] abserr(); SV* funcion) info not available diff_central does not process bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. diff_backward Signature: (double x(); double [o] res(); double [o] abserr(); SV* funcion) info not available diff_backward does not process bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. diff_forward Signature: (double x(); double [o] res(); double [o] abserr(); SV* funcion) info not available diff_forward does not process bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. perl v5.12.1 2010-07-05 DIFF(3)
All times are GMT -4. The time now is 01:14 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy