Sponsored Content
Full Discussion: nested read
Top Forums Shell Programming and Scripting nested read Post 48406 by TioTony on Friday 5th of March 2004 02:11:49 PM
Old 03-05-2004
Thanks! don't know why that didn't occur to me. Works great.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Nested while read line loop

Hi, Can anyone please help me: i'm trying to read a file with directory-names , then go to that directory and read another (output) file to perform some tasks per line (second read line in the part of script below). The problem is that after the nested while loop has finished, the first while... (7 Replies)
Discussion started by: Rakker
7 Replies

2. Shell Programming and Scripting

Nested Symlinks?

Please don't laugh or call me a fool... I'm trying to set up a script that will go through my Music File directory and generate a set of symbolic links in a directory called "What's New". Within that directory there will be a "30 Days", "3 Months", "6 Months" and "A Year" directories. Within... (0 Replies)
Discussion started by: deckard
0 Replies

3. Shell Programming and Scripting

while read loop w/ a nested if statement - doesn't treat each entry individually

Hi - Trying to take a list of ldap suffixes in a file, run an ldapsearch command on them, then run a grep command to see if it's a match, if not, then flag that and send an email alert. The list file (ldaplist) would look like - *********** o=company a o=company b *********** **... (7 Replies)
Discussion started by: littlefrog
7 Replies

4. Shell Programming and Scripting

nested for loops

I need help getting over this bump on how nested for loops work in shell. Say i was comparing files in a directory in any other language my for loop would look like so for(int i=0;to then end; i++) for(int y = i+1; to the end; y++) I can't seem to understand how i can translate that... (5 Replies)
Discussion started by: taiL
5 Replies

5. UNIX for Dummies Questions & Answers

Nested If statement within Do / Done

Hi all! I'm really hoping you can help me out here; now i have searched and searched and have at least worked out that you can't have a nested if statement with a 'done' in it (as i have) as you're killing the parent before the child. So here's what i have, and here's hoping someone can help... (2 Replies)
Discussion started by: dalgibbard
2 Replies

6. UNIX for Dummies Questions & Answers

Faster than nested while read loops?

Hi experts, I just want to know if there is a better solution to my nested while read loops below: while read line; do while read line2; do while read line3; do echo "$line $line2 $line3" done < file3.txt done < file2.txt done < file1.txt >... (4 Replies)
Discussion started by: chstr_14
4 Replies

7. Shell Programming and Scripting

Optimize the nested IF

Hi, I have to assign a value for a varaiable based on a Input. I have written the below code: if then nf=65 elif then nf=46 elif then nf=164 elif then nf=545 elif then nf=56 elif then (3 Replies)
Discussion started by: machomaddy
3 Replies

8. Shell Programming and Scripting

Nested ifs

hi I keep getting an error with this nested if statement and am getting the error unexpected end of file, can anyone help me as to why this wont execute? #!/bin/bash #script to check wether the -i -v statements run correctly removeFile () { mv $1 $HOME/deleted }... (3 Replies)
Discussion started by: somersetdan
3 Replies

9. Shell Programming and Scripting

Nested if else

Hi, i m trying to create script which logic is like below. if ; then x=`cat /tmp/testoutput.log | grep STOP | wc -l` y=`cat /tmp/testoutput.log | grep RUN | wc -l` if ; then echo "process stop" if ; then echo "process running " else echo "file not found" fi ----------------... (2 Replies)
Discussion started by: tapia
2 Replies

10. UNIX for Dummies Questions & Answers

[Solved] Nested If

I am having a problem with a nested if. I am sure I am overlooking something. I check for the existence of $Pidfl3 and it exists, o this condition I then want to check for the existence of a next file and remove it. The first if is executed, but on the second if I get test: argument expected. My... (4 Replies)
Discussion started by: Charles Swart
4 Replies
Math(3) 						User Contributed Perl Documentation						   Math(3)

NAME
PDL::Math - extended mathematical operations and special functions SYNOPSIS
use PDL::Math; use PDL::Graphics::TriD; imag3d [SURF2D,bessj0(rvals(zeroes(50,50))/2)]; DESCRIPTION
This module extends PDL with more advanced mathematical functions than provided by standard Perl. All the functions have one input pdl, and one output, unless otherwise stated. The functions are usually available from the system maths library, however if they are not (determined when PDL is compiled) a version from the Cephes math library is used. FUNCTIONS
acos Signature: (a(); [o]b()) The usual trigonometric function. Works inplace. asin Signature: (a(); [o]b()) The usual trigonometric function. Works inplace. atan Signature: (a(); [o]b()) The usual trigonometric function. Works inplace. cosh Signature: (a(); [o]b()) The standard hyperbolic function. Works inplace. sinh Signature: (a(); [o]b()) The standard hyperbolic function. Works inplace. tan Signature: (a(); [o]b()) The usual trigonometric function. Works inplace. tanh Signature: (a(); [o]b()) The standard hyperbolic function. Works inplace. ceil Signature: (a(); [o]b()) Round to integral values in floating-point format. Works inplace. floor Signature: (a(); [o]b()) Round to integral values in floating-point format. Works inplace. rint Signature: (a(); [o]b()) Round to integral values in floating-point format. Works inplace. pow Signature: (a(); b(); [o]c()) Synonym for `**'. Works inplace. acosh Signature: (a(); [o]b()) The standard hyperbolic function. Works inplace. asinh Signature: (a(); [o]b()) The standard hyperbolic function. Works inplace. atanh Signature: (a(); [o]b()) The standard hyperbolic function. Works inplace. erf Signature: (a(); [o]b()) The error function. Works inplace. erfc Signature: (a(); [o]b()) The complement of the error function. Works inplace. bessj0 Signature: (a(); [o]b()) The standard Bessel function. Works inplace. bessj1 Signature: (a(); [o]b()) The standard Bessel function. Works inplace. bessy0 Signature: (a(); [o]b()) The standard Bessel function. Works inplace. bessy1 Signature: (a(); [o]b()) The standard Bessel function. Works inplace. bessjn Signature: (a(); int n(); [o]b()) The standard Bessel function. This has a second integer argument which gives the order of the function required. Works inplace. bessyn Signature: (a(); int n(); [o]b()) The standard Bessel function. This has a second integer argument which gives the order of the function required. Works inplace. lgamma Signature: (a(); [o]b(); int[o]s()) log gamma function This returns 2 piddles -- the first set gives the log(gamma) values, while the second set, of integer values, gives the sign of the gamma function. This is useful for determining factorials, amongst other things. badmask Signature: (a(); b(); [o]c()) Clears all "infs" and "nans" in $a to the corresponding value in $b. badmask can be run with $a inplace: badmask($a->inplace,0); $a->inplace->badmask(0); isfinite Signature: (a(); int [o]mask()) Sets $mask true if $a is not a "NaN" or "inf" (either positive or negative). Works inplace. erfi Signature: (a(); [o]b()) The inverse of the error function. Works inplace. ndtri Signature: (a(); [o]b()) The value for which the area under the Gaussian probability density function (integrated from minus infinity) is equal to the argument (cf erfi). Works inplace. svd Signature: (a(n,m); [o]u(n,m); [o,phys]z(n); [o]v(n,n)) Singular value decomposition of array. ($u, $s, $v) = svd($a); polyroots Signature: (cr(n); ci(n); [o]rr(m); [o]ri(m)) Complex roots of a complex polynomial, given coefficients in order of decreasing powers. ($rr, $ri) = polyroots($cr, $ci); eigens Signature: ([phys]a(m); [o,phys]ev(n,n); [o,phys]e(n)) Eigenvalues and -vectors of a symmetric square matrix. If passed an asymmetric matrix, the routine will warn and symmetrize it. ($e, $ev) = eigens($a); simq Signature: ([phys]a(n,n); [phys]b(n); [o,phys]x(n); int [o,phys]ips(n); int flag) Solution of simultaneous linear equations, "a x = b". $a is an "n x n" matrix (i.e., a vector of length "n*n"), stored row-wise: that is, "a(i,j) = a[ij]", where "ij = i*n + j". While this is the transpose of the normal column-wise storage, this corresponds to normal PDL usage. The contents of matrix a may be altered (but may be required for subsequent calls with flag = -1). $b, $x, $ips are vectors of length "n". Set "flag=0" to solve. Set "flag=-1" to do a new back substitution for different $b vector using the same a matrix previously reduced when "flag=0" (the $ips vector generated in the previous solution is also required). squaretotri Signature: (a(n,n); b(m)) Convert a symmetric square matrix to triangular vector storage BUGS
Hasn't been tested on all platforms to ensure Cephes versions are picked up automatically and used correctly. AUTHOR
Copyright (C) R.J.R. Williams 1997 (rjrw@ast.leeds.ac.uk), Karl Glazebrook (kgb@aaoepp.aao.gov.au) and Tuomas J. Lukka (Tuomas.Lukka@hel- sinki.fi). 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. perl v5.8.0 2003-01-29 Math(3)
All times are GMT -4. The time now is 02:29 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy