Sponsored Content
Full Discussion: passing argument in script?
Top Forums Shell Programming and Scripting passing argument in script? Post 302701063 by delugeag on Friday 14th of September 2012 04:11:05 PM
Old 09-14-2012
$# return the number of argument.
This User Gave Thanks to delugeag For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Passing argument to awk script

I am writing a shell script. Now i need to read in a string and send it to an awk file to compare and search for compatible record. I wrote it like tat: read serial | awk -f generate.awk data.dat p/s: the data file got 6 field. According to an expert, we can write it like tat: read... (1 Reply)
Discussion started by: AkumaTay
1 Replies

2. Shell Programming and Scripting

Passing argument from one script to other

Dear All, I have one script which accepts database name and user_id from the user, i have another script that will unload the data from all the tables based on the user_id accepted by the user. How can i pass the user_id from the 1st script to the other. My OS is sun solaris. Thanks in... (3 Replies)
Discussion started by: lloydnwo
3 Replies

3. Shell Programming and Scripting

Problem when passing argument to a shell script

Hi all, I'm new to Shell scripting. In my shell script for Bourne shell, the script accepts a date parameter which is optional. If the value is supplied, the supplied value should be assigned to a variable. If not, the current date will be assigned to the variable. My script is like this. #!... (9 Replies)
Discussion started by: sumesh.abraham
9 Replies

4. Shell Programming and Scripting

Need to run the script by argument passing

Hi All, I have a question regarding running this script by passing an argument, for example ./ShellParse.sh sun, how do i do that? So i want when i pass argument sun, it shouild execute things inside the for loop. I want to support some other platforms too, so there are more for loops to... (3 Replies)
Discussion started by: asirohi
3 Replies

5. Shell Programming and Scripting

Its Urgent ::: Passing Argument during Script Execution

Dear All, Plz, can someone clarify me regarding the below. Actually I want to write the script that will get the some parameter like "yes" or "No" as we wish during execution without prompting for entering that word. Plz tell me... Its Urgent.. Thanks & Regards ... (1 Reply)
Discussion started by: ks47
1 Replies

6. Shell Programming and Scripting

Passing argument to a script while executing it within current shell

Hi Gurus, I have written a script set_env.ksh to which I pass an argument and set the oracle login credentials based on the argument I pass. The script has code as below. ORACLE_SID=$1 DB_SCHEMA_LOGON=$DB_SCHEMA_USER/$DB_SCHEMA_PASSWORD@$ORACLE_SID; export DB_SCHEMA_LOGON; echo... (3 Replies)
Discussion started by: Sabari Nath S
3 Replies

7. Shell Programming and Scripting

Passing value as a command line argument in awk script.

I have one working awk command line. Which taking data from the “J1202523.TXT” file and generating the “brazil.dat” file. PFB code. awk '{ DUNS = substr($0,0,9);if ( substr($0,14,3) == "089" ) print DUNS }' J1202523.TXT > Brazil.dat But now I want to pass two parameter as a command line argument... (4 Replies)
Discussion started by: humaemo
4 Replies

8. Shell Programming and Scripting

Passing --usage as argument to awk script

I have the awk script below and things go wrong when I do awk -v dsrmx=25 -f ./checkSRDry.awk --usage I basically want to override the usual --usage and --help that awk gives. How do people usually handle this situation when you also want to supply your own usage and help concerning the... (2 Replies)
Discussion started by: kristinu
2 Replies

9. Shell Programming and Scripting

Passing argument from Java to Shell script

Hi All, I want to pass array of argument from Java to a shell script.I can use process builder api and its exec() method to call the script,but the question is how to receive the parameter in the script. Thanks in advance ---------- Post updated at 10:00 PM ---------- Previous update was... (1 Reply)
Discussion started by: Abhijeet_Atti
1 Replies

10. Shell Programming and Scripting

Passing variable as an argument to another script

Hi, I am trying to pass a variable as an argument to another script. While substitution of variable, I am facing a problem. varaiable "a" value should be -b "FPT MAIN". When we pass "a" to another script, we are expecing it to get substitue as ./test.sh -b "FPT MAIN". But, it is getting... (9 Replies)
Discussion started by: Manasa Pradeep
9 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 CATEGORY
Mathematics 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 03:45 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy