Sponsored Content
Top Forums Shell Programming and Scripting AWK Looping. How can I get expected result? Post 302768997 by Jotne on Monday 11th of February 2013 02:57:36 AM
Old 02-11-2013
And how do you like to calculate this two file to get your result?
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Looping in awk

Can somebody give me a cleaner way of writing the following script. I was thinking that I could use a loop in the awk statement. It works fine the way it is but I just want the script to be cleaner. #!/usr/bin/sh for r in 0 1 2 3 4 5 6 do DAY=`gdate --date="${r} days ago" +%m\/%d\/%y`... (3 Replies)
Discussion started by: keelba
3 Replies

2. UNIX for Advanced & Expert Users

executing script by cron doesnt give me expected result

Hi frnds... I m facing very irritating problem already waisted my 2 days.. I have a following script..( i am pasting only the main code) ftp -ivn 213.194.40.77 <<FTP user $user $password binary cd $FileDir/out lcd $localpath get $file rename $FileDir/out/$file $FileDir/tmp/$file... (1 Reply)
Discussion started by: clx
1 Replies

3. UNIX for Dummies Questions & Answers

Help with AWK looping

I'm trying to parse a configuration text file using awk. The following is a sample from the file I'm searching. I can retrieve the formula and recipe names easily but now I want to take it one step farther. In addition to the formula name, I would like to also get the value of the attribute... (6 Replies)
Discussion started by: new2awk
6 Replies

4. Programming

Test program not giving expected result

I have five classes. 2 composition classes,1 aggregation class and 1 dependency class.I have coded all the classes but one of my test program is not giving me the expected result.I have the following classes: TimeStamp Interval (composition of 2 TimeStamps) TimeSheet ( aggregation of many... (3 Replies)
Discussion started by: moraks007
3 Replies

5. Shell Programming and Scripting

looping in awk

How do I remove last comma? echo "xx yy zz" | awk 'BEGIN{FS=" "}{for (i=1; i<=NF; i++) printf "%s,", $i}'output: xx,yy,zz, required output: xx,yy,zz or (ideally!): xx, yy & zz many thanks in advance! (4 Replies)
Discussion started by: euval
4 Replies

6. Shell Programming and Scripting

Result of Catching Return Value from Sub_script.sh to Main_script.sh is not as Expected

Main_script.sh #! /bin/sh ./Sub_script.sh rc=$? echo "Return code from Sub_script.sh : $rc" if ; then echo "$rc = 991" echo "" exit 1 elif ; then echo "$rc = 992" echo "" exit 1 elif ; then echo "$rc = 0" echo "" exit 1 fi (2 Replies)
Discussion started by: duddukuri
2 Replies

7. Shell Programming and Scripting

Help on looping using awk

I have the data like this: PONUMBER,SUPPLIER,LINEITEM,SPLITLINE,LINEAMOUNT,CURRENCY IR5555,Supplier1,1,1,83.1,USD IR5555,Supplier1,1,3,40.4,USD IR5555,Supplier1,1,6,54.1,USD IR5555,Supplier1,1,8,75.1,USD IR5556,Supplier2,1,1,41.1,USD IR5556,Supplier2,1,3,43.1,USD ... (3 Replies)
Discussion started by: jeffreybsu
3 Replies

8. Shell Programming and Scripting

Assigning variable to output gives error with expected result

Hello, I am trying to print out the first string matching query with grep and I need your help. My scenario: Database John F 4433 Street No 88 CA Elisabeth Taylor 7733 Street No 26 ON Jack Nicholson 0133 Green Park No 34 AR John F 2 9399 Southpark No 02D UT test.sh... (6 Replies)
Discussion started by: baris35
6 Replies

9. Shell Programming and Scripting

Not getting expected result

Hi Experts, I have written the below script but its not working as per expectation. My requirement is if this condition ] is satisfied then only check for this condition ] if this also satisfied check for the condition ]. vi p_values.ksh path="/db/ora/files" mode=1 b_days=10... (5 Replies)
Discussion started by: nalu
5 Replies

10. Shell Programming and Scripting

Grep output to file result not as expected

Hi Gurus, I run command grep ABC file1 > file2 against below file. I got all ABC_xxx in one line in file2. I expect to get multiple lines in file2. If I print result in screen, the result is expected. thanks in advance My os is SunOS 5.10 Generic_150400-64 sun4v sparc sun4v ABC_123 XXXXX... (2 Replies)
Discussion started by: green_k
2 Replies
lgamma(3M)																lgamma(3M)

NAME
lgamma(), lgammaf(), lgammal(), lgammaw(), lgammaq(), lgamma_r(), lgammaf_r(), lgammal_r(), lgammaw_r(), lgammaq_r(), gamma(), gammaf(), gammal(), gammaw(), gammaq(), gamma_r(), gammaf_r(), gammal_r(), gammaw_r(), gammaq_r(), signgam - log gamma functions SYNOPSIS
HP Integrity Server Only DESCRIPTION
and return , where is defined as the integral, as t goes from zero to infinity, of times t to the power (x-1). The sign of is returned in the external integer The function, available on Integrity servers, can be used to calculate Or, the following C program fragment can be used to calculate where if y is greater than as defined in the header file, returns a range error. (See exp(3M).) The log gamma function is not reentrant because it uses the global variable The function is a reentrant version of that can be used in multi-threaded applications. The function stores the sign of in the object pointed to by the second argument sign. The value pointed to by sign is +1 if is positive, -1 if it is negative. The and functions are functionally equivalent to and and are versions of and respectively; they take a (first) argument and return a result. and are versions of and respectively; they take a (first) argument and return a result. and are versions of and respectively; they take an (first) argument and return an result. and are equivalent to and respectively on HP-UX systems. USAGE
To use these functions, compile either with the default option or with the and options. To use (for Integrity servers) or compile also with the option. Make sure your program includes and link in the math library by specifying on the compiler or linker command line. For more information, see the at the following site: RETURN VALUE
returns +0. returns +0. returns +Inf and raises the divide-by- zero floating-point exception for x a negative integer or zero. returns +Inf. returns +Inf. If x is NaN, and return NaN. returns infinity (equal to in lieu of a value whose magnitude is too large, and raises the overflow and inexact exceptions. When it raises no other exception, whether raises the inexact exception is unspecified. WARNINGS
and are unsafe in multi-thread applications. is MT-Safe and should be used instead. SEE ALSO
exp(3M), log(3M), tgamma(3M), math(5). STANDARDS CONFORMANCE
: SVID3, XPG4.2, ISO/IEC C99 (including Annex F, "IEC 60559 floating-point arithmetic") : SVID3, XPG4.2 : ISO/IEC C99 (including Annex F, "IEC 60559 floating-point arithmetic") lgamma(3M)
All times are GMT -4. The time now is 05:26 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy