Sponsored Content
Top Forums Shell Programming and Scripting Read file input in while loop does not work on AIX system Post 303039331 by mohtashims on Tuesday 1st of October 2019 03:45:30 AM
Old 10-01-2019
@MadeinGermany: I love your answers !! They are precise Smilie

Works fine. I will test more conditions shorlty.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

input inside while read loop

Hi all Does anyone have a script that will allow me to stop inside a while read loop. I want to pause the loop until a enter is pressed. e.g. While read line do echo something if LINECOUNT > 40 then read ENTER?"PRESS ENTER TO CONT..." ... (3 Replies)
Discussion started by: jhansrod
3 Replies

2. UNIX for Dummies Questions & Answers

read user input from within a wile loop that is being fed from below

hi! i need to do a ksh script that uses a wile loop that is fed form below while read line do some things done < myfile inside the while loop i need to read user input to ask the user what he wants to do, but "read" reads the file, and not the standard input while read line do ... (2 Replies)
Discussion started by: broli
2 Replies

3. Shell Programming and Scripting

read command (input) inside the while loop

Hi, 'read' command is not working inside the while loop, How can I solve this? Rgds, Sharif. (2 Replies)
Discussion started by: sharif
2 Replies

4. Shell Programming and Scripting

File system creation script on AIX 6.1 using while loop

#!/bin/sh echo "VG: " read VG echo "LP: " read LP echo "SAP: " read SAP echo "NUM: " read NUM echo "SID: " read SID while ]; read VG LP SAP NUM SID ; do mklv -y $SAP$NUM -t jfs2 -e x $VG $LP; crfs -v jfs2 -d /dev/$SAP$NUM -m /oracle/$SID/$SAP$NUM ... (14 Replies)
Discussion started by: arorap
14 Replies

5. Shell Programming and Scripting

ksh while read loop breaks after one record - AIX

#!/bin/ksh for SRV in imawasp01 \ imawasp02 \ imawasp03 \ imawasp04 \ imawasp05 \ imawasp06 \ imawasp07 \ imawasp08 \ imawasp09 do print "${SRV}" while read PASSLINE do SRVNAME=`echo ${PASSLINE} | awk -F\: '{print $1}'` LASTLOGIN=`ssh ${SRV} lsuser ${SRVNAME} | tr '... (2 Replies)
Discussion started by: port43
2 Replies

6. Shell Programming and Scripting

Read input files and merge them in given order and write them to input one param or one file

Dear Friends, I am looking for a shell script to merge input files into one file .. here is my idea: 1st paramter would be outfile file (all input files content) read all input files and merge them to input param 1 ex: if I pass 6 file names to the script then 1st file name as output file... (4 Replies)
Discussion started by: hyd1234
4 Replies

7. Shell Programming and Scripting

Use while loop to read file and use ${file} for both filename input into awk and as string to print

I have files named with different prefixes. From each I want to extract the first line containing a specific string, and then print that line along with the prefix. I've tried to do this with a while loop, but instead of printing the prefix I print the first line of the file twice. Files:... (3 Replies)
Discussion started by: pathunkathunk
3 Replies

8. Shell Programming and Scripting

ksh loop to read input until QUIT

Hi I'm looking to write a simple ksh loop reading user input (and write it to a file) until the user enters QUIT at which point I want it to continue. Does anyone have an example of this type of loop? Any help much appreciated Cheers (2 Replies)
Discussion started by: Grueben
2 Replies

9. Shell Programming and Scripting

Unable to read user input inside a loop

Hi, This query is a part of a much more lengthy script. I wish to look for all the files in a folder named "data" which in this case has two files i.e. plan.war and agent.properties. For all the files found under data I wish to ask the user as to where they wish copy the files to. Below,... (14 Replies)
Discussion started by: mohtashims
14 Replies

10. UNIX for Beginners Questions & Answers

How to make a loop to read the input from a file part by part?

Hi All, We've a VDI infrastructure in AWS (AWS workspaces) and we're planning to automate the process of provisioning workspaces. Instead of going to GUI console, and launching workspaces by selecting individual users is little time consuming. Thus, I want to create them in bunches from AWS CLI... (6 Replies)
Discussion started by: arun_adm
6 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. Many of the functions are linked from the system maths library or the Cephes maths library (determined when PDL is compiled); a few are implemented entirely in PDL. FUNCTIONS
acos Signature: (a(); [o]b()) The usual trigonometric function. Works inplace. acos does handle bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. asin Signature: (a(); [o]b()) The usual trigonometric function. Works inplace. asin does handle bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. atan Signature: (a(); [o]b()) The usual trigonometric function. Works inplace. atan does handle bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. cosh Signature: (a(); [o]b()) The standard hyperbolic function. Works inplace. cosh does handle bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. sinh Signature: (a(); [o]b()) The standard hyperbolic function. Works inplace. sinh does handle bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. tan Signature: (a(); [o]b()) The usual trigonometric function. Works inplace. tan does handle bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. tanh Signature: (a(); [o]b()) The standard hyperbolic function. Works inplace. tanh does handle bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. ceil Signature: (a(); [o]b()) Round to integral values in floating-point format. Works inplace. ceil does handle bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. floor Signature: (a(); [o]b()) Round to integral values in floating-point format. Works inplace. floor does handle bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. rint Signature: (a(); [o]b()) Round to integral values in floating-point format. Works inplace. rint does handle bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. pow Signature: (a(); b(); [o]c()) Synonym for `**'. Works inplace. pow does handle bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. acosh Signature: (a(); [o]b()) The standard hyperbolic function. Works inplace. acosh does handle bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. asinh Signature: (a(); [o]b()) The standard hyperbolic function. Works inplace. asinh does handle bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. atanh Signature: (a(); [o]b()) The standard hyperbolic function. Works inplace. atanh does handle bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. erf Signature: (a(); [o]b()) The error function. Works inplace. erf does handle bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. erfc Signature: (a(); [o]b()) The complement of the error function. Works inplace. erfc does handle bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. bessj0 Signature: (a(); [o]b()) The standard Bessel function. Works inplace. bessj0 does handle bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. bessj1 Signature: (a(); [o]b()) The standard Bessel function. Works inplace. bessj1 does handle bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. bessy0 Signature: (a(); [o]b()) The standard Bessel function. Works inplace. bessy0 does handle bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. bessy1 Signature: (a(); [o]b()) The standard Bessel function. Works inplace. bessy1 does handle bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. 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. bessjn does handle bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. 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. bessyn does handle bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. 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. lgamma does handle bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. 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); If bad values are present, these are also cleared. isfinite Signature: (a(); int [o]mask()) Sets $mask true if $a is not a "NaN" or "inf" (either positive or negative). Works inplace. Bad values are treated as "NaN" or "inf". erfi Signature: (a(); [o]b()) The inverse of the error function. Works inplace. erfi does handle bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. 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. ndtri does handle bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. 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); polyroots 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. 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@helsinki.fi). Portions (C) Craig DeForest 2002 (deforest@boulder.swri.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 PDL copyright notice should be included in the file. perl v5.12.1 2010-07-05 Math(3)
All times are GMT -4. The time now is 03:34 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy