Sponsored Content
Full Discussion: passing Argument
Top Forums Shell Programming and Scripting passing Argument Post 302257850 by Shahul on Thursday 13th of November 2008 07:50:21 AM
Old 11-13-2008
hi wempy

Thanks for your valid suggestion..

Yes now i am using the argument principle..

it works Smilie

Thanks
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Problem with Argument Passing

Greetings, I am wrapping the monitoring commands like vmstat, sar, iostat and call via arguments I want ./unix_stats.sh -v vmstat -p <SEC> -d <Duration> to give vmstat values, and similarly iostat etc.,. Also if I give ./unix_stats.sh -v vmstat -i iostat -p <SEC> -d <Duration> should give... (4 Replies)
Discussion started by: A_Rod
4 Replies

2. Shell Programming and Scripting

Passing more than one argument in a function

Hi All, Calling a function with one argument and storing the return value in a shell script is as below:( so far I know) value="`fun_1 "argument1"`" Its working perfectly for me. Can u help me with passing more than one argument and storing the return value Thnaks in advance JS (1 Reply)
Discussion started by: jisha
1 Replies

3. Shell Programming and Scripting

Problem in argument passing

Hell all, i have a problem in argument passing. print() { a=$1 b=$2 c=$3 echo $a echo $b echo $c } x="1 2 3" y="4 5 6" z="7 8 9" print $x $y $z. (4 Replies)
Discussion started by: tsaravanan
4 Replies

4. UNIX for Dummies Questions & Answers

Using * when passing argument to alias

I have some folders with this structure: /data/me/a123xxx Where "xxx" is some changing series of letters, and "123" changes so folders might look like: /data/me/a123xxx /data/me/a234ysd /data/me/a534sds etc. The numbers are what matter to me (they identify the folder), so I created an... (7 Replies)
Discussion started by: ramparts
7 Replies

5. Shell Programming and Scripting

Passing argument to nawk

Hi all I have got a file digits.data containing the following data 1 3 4 2 4 9 7 3 1 7 3 10 I am writing a script that will pass an argument from C-shell to nawk command. But it seems the values in the nawk comman does not get set. the program does not print no values out. Here is the... (2 Replies)
Discussion started by: ganiel24
2 Replies

6. Shell Programming and Scripting

Help with Passing argument and testing

Hi all First of all thanks for everyone to read by doubt.Am beginner in shell scripting Following are my doubts i have to pass an argument to shellscript how can i do that second i have to test the argument and shows error when nothing is passes third i have to match exact argument... (3 Replies)
Discussion started by: zeebala1981
3 Replies

7. Programming

Passing argument to command in C

Hello all, New to C and I'm trying to write a program which can run a unix command. Would like to have the option of giving the user the ability to enter arguments e.g for "ls" be able to run "ls -l". I would appreciate any help. Thanks #include <stdio.h> #include <unistd.h> #include... (3 Replies)
Discussion started by: effizy
3 Replies

8. Shell Programming and Scripting

Help with passing argument

Hi, I have a script that is scheduled with cron and runs every night. The cron part looks like this: 00 20 * * 0,1,2,3,4,5,6 /usr/local/bin/BACKUP TBTARM HOT DELETE My issue is with the 3rd parameter. Somewhere in the script, i want to tell the script to delete some files if the 3rd... (7 Replies)
Discussion started by: dollypee
7 Replies

9. Shell Programming and Scripting

Argument passing

How to pass the alphabet character as a argument in case and in if block? ex: c=$1 if a-z ]] then echo "alphabet" case $1 in a-z) echo "the value is a alphabet" edit by bakunin: please use CODE-tags. We REALLY mean it. (9 Replies)
Discussion started by: Roozo
9 Replies

10. UNIX for Beginners Questions & Answers

Passing a second argument

I am trying to pass a second argument like so: if ] then export ARG2=$2 else message "Second argument not specified: USAGE - $PROGRAM_NAME ARG1 ARG2" checkerror -e 2 -m "Please specify if it is a history or weekly (H or W) extract in the 2nd argument" fi however, it always goes... (4 Replies)
Discussion started by: MIA651
4 Replies
math::complexnumbers(n) 					 Tcl Math Library					   math::complexnumbers(n)

__________________________________________________________________________________________________________________________________________________

NAME
math::complexnumbers - Straightforward complex number package SYNOPSIS
package require Tcl 8.3 package require math::complexnumbers ?1.0.2? ::math::complexnumbers::+ z1 z2 ::math::complexnumbers::- z1 z2 ::math::complexnumbers::* z1 z2 ::math::complexnumbers::/ z1 z2 ::math::complexnumbers::conj z1 ::math::complexnumbers::real z1 ::math::complexnumbers::imag z1 ::math::complexnumbers::mod z1 ::math::complexnumbers::arg z1 ::math::complexnumbers::complex real imag ::math::complexnumbers::tostring z1 ::math::complexnumbers::exp z1 ::math::complexnumbers::sin z1 ::math::complexnumbers::cos z1 ::math::complexnumbers::tan z1 ::math::complexnumbers::log z1 ::math::complexnumbers::sqrt z1 ::math::complexnumbers::pow z1 z2 _________________________________________________________________ DESCRIPTION
The mathematical module complexnumbers provides a straightforward implementation of complex numbers in pure Tcl. The philosophy is that the user knows he or she is dealing with complex numbers in an abstract way and wants as high a performance as can be had within the limita- tions of an interpreted language. Therefore the procedures defined in this package assume that the arguments are valid (representations of) "complex numbers", that is, lists of two numbers defining the real and imaginary part of a complex number (though this is a mere detail: rely on the complex command to con- struct a valid number.) Most procedures implement the basic arithmetic operations or elementary functions whereas several others convert to and from different rep- resentations: set z [complex 0 1] puts "z = [tostring $z]" puts "z**2 = [* $z $z] would result in: z = i z**2 = -1 AVAILABLE PROCEDURES
The package implements all or most basic operations and elementary functions. The arithmetic operations are: ::math::complexnumbers::+ z1 z2 Add the two arguments and return the resulting complex number complex z1 (in) First argument in the summation complex z2 (in) Second argument in the summation ::math::complexnumbers::- z1 z2 Subtract the second argument from the first and return the resulting complex number. If there is only one argument, the opposite of z1 is returned (i.e. -z1) complex z1 (in) First argument in the subtraction complex z2 (in) Second argument in the subtraction (optional) ::math::complexnumbers::* z1 z2 Multiply the two arguments and return the resulting complex number complex z1 (in) First argument in the multiplication complex z2 (in) Second argument in the multiplication ::math::complexnumbers::/ z1 z2 Divide the first argument by the second and return the resulting complex number complex z1 (in) First argument (numerator) in the division complex z2 (in) Second argument (denominator) in the division ::math::complexnumbers::conj z1 Return the conjugate of the given complex number complex z1 (in) Complex number in question Conversion/inquiry procedures: ::math::complexnumbers::real z1 Return the real part of the given complex number complex z1 (in) Complex number in question ::math::complexnumbers::imag z1 Return the imaginary part of the given complex number complex z1 (in) Complex number in question ::math::complexnumbers::mod z1 Return the modulus of the given complex number complex z1 (in) Complex number in question ::math::complexnumbers::arg z1 Return the argument ("angle" in radians) of the given complex number complex z1 (in) Complex number in question ::math::complexnumbers::complex real imag Construct the complex number "real + imag*i" and return it float real (in) The real part of the new complex number float imag (in) The imaginary part of the new complex number ::math::complexnumbers::tostring z1 Convert the complex number to the form "real + imag*i" and return the string float complex (in) The complex number to be converted Elementary functions: ::math::complexnumbers::exp z1 Calculate the exponential for the given complex argument and return the result complex z1 (in) The complex argument for the function ::math::complexnumbers::sin z1 Calculate the sine function for the given complex argument and return the result complex z1 (in) The complex argument for the function ::math::complexnumbers::cos z1 Calculate the cosine function for the given complex argument and return the result complex z1 (in) The complex argument for the function ::math::complexnumbers::tan z1 Calculate the tangent function for the given complex argument and return the result complex z1 (in) The complex argument for the function ::math::complexnumbers::log z1 Calculate the (principle value of the) logarithm for the given complex argument and return the result complex z1 (in) The complex argument for the function ::math::complexnumbers::sqrt z1 Calculate the (principle value of the) square root for the given complex argument and return the result complex z1 (in) The complex argument for the function ::math::complexnumbers::pow z1 z2 Calculate "z1 to the power of z2" and return the result complex z1 (in) The complex number to be raised to a power complex z2 (in) The complex power to be used BUGS, IDEAS, FEEDBACK This document, and the package it describes, will undoubtedly contain bugs and other problems. Please report such in the category math :: complexnumbers of the Tcllib SF Trackers [http://sourceforge.net/tracker/?group_id=12883]. Please also report any ideas for enhancements you may have for either package and/or documentation. KEYWORDS
complex numbers, math COPYRIGHT
Copyright (c) 2004 Arjen Markus <arjenmarkus@users.sourceforge.net> math 1.0.2 math::complexnumbers(n)
All times are GMT -4. The time now is 11:45 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy