Sponsored Content
Top Forums Shell Programming and Scripting Can't assign float value into another variable Post 302677463 by csharpque on Thursday 26th of July 2012 06:42:37 AM
Old 07-26-2012
No i am using Bash shell
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

assign to variable

why i can't use this command: echo $arg | cut -c 1,2 | read remainArg or echo $arg | cut -c 1,2 | read $remainArg so that the result will be assign to remainArg. Anyway to do this? :) (1 Reply)
Discussion started by: AkumaTay
1 Replies

2. Shell Programming and Scripting

Assigning a shell variable as a float

I'm confused as to how to handle floating point numbers in shell scripts. Is there a way to convert a number (string) read into a shell variable so that it can be used as a floating point decimal for calculation purposes? Or am I stuck with integrating C or Perl into my script? Ex: --input ... (3 Replies)
Discussion started by: spieterman
3 Replies

3. Shell Programming and Scripting

assign a value to a variable

I have a list of names in a file. i want to assign those names to a variable in such a manner eg: $cat file.txt pete lisa john var=pete-lisa-john how do i do this in shell scripting? (10 Replies)
Discussion started by: Shivdatta
10 Replies

4. Programming

math.h: float ceilf(float x)

Good morning, I'm testing the use of ceilf: /*Filename: str.c*/ #include <stdio.h> #include <math.h> int main (void) { float ceilf(float x); int dev=3, result=0; float tmp = 3.444f; printf("Result: %f\n",ceilf(tmp)); return 0; } (1 Reply)
Discussion started by: jonas.gabriel
1 Replies

5. Solaris

i cannot assign float point numbers to an array in solaris

total=0 declare -a sum limit=`iostat -En | grep -i size | awk '{print $2}' | sed -e 's/GB//g' | wc -l` echo "Limit is equal to $limit" ara="`iostat -En | grep -i size | awk '{print $2}' | sed -e 's/GB//g'`" for (( i=1; i<=$limit; i++ )) do sum=`echo $ara | cut -d " " -f $i` echo ${sum}... (11 Replies)
Discussion started by: naree
11 Replies

6. Shell Programming and Scripting

Assign this to a variable....

bash-3.00$ /usr/bin/netstat -an -f inet | awk -F' ' '{if ($1$4 == "tcp*.21")print $5}' *.* bash-3.00$ A=` /usr/bin/netstat -an -f inet | awk -F' ' '{if ($1$4 == "tcp*.21")print $5}'` bash-3.00$ echo $A db2_lastdone.bkp As you can see ,after running command i get *.* in return but the same... (5 Replies)
Discussion started by: ak835
5 Replies

7. Shell Programming and Scripting

assign awk's variable to shell script's variable?

Dear All, we have a command output which looks like : Total 200 queues in 30000 Kbytes and we're going to get "200" and "30000" for further process. currently, i'm using : numA=echo $OUTPUT | awk '{print $2}' numB=echo $OUTPUT | awk '{print $5}' my question is : can I use just one... (4 Replies)
Discussion started by: tiger2000
4 Replies

8. Shell Programming and Scripting

Shell assign variable to another variable

How can I assign a variable to an variable. IE $car=honda One way I can do it is export $car=honda or let $car=2323 Is there any other ways to preform this task (3 Replies)
Discussion started by: 3junior
3 Replies

9. UNIX for Beginners Questions & Answers

Need to pass variable in a command and assign value to a variable

Hello All, Hope you're doing well ! I am trying below command to be passed in a shell script, header_date_14 is a variable and $1 is the name of a file I intend to pass as a command line argument, however command line argument is not being accepted. header_date_14=$(m_dump... (8 Replies)
Discussion started by: ektubbe
8 Replies

10. UNIX for Beginners Questions & Answers

How can I assign awk's variable to shell script's variable?

I have the following script, and I want to assign the output ($10 and $5) from awk to N and L: grdinfo data.grd | awk '{print $10,$5}'| read N L output from gridinfo data.grd is: data.grd 50 100 41 82 -2796 6944 0.016 0.016 3001 2461. where N and L is suppose to be 3001 and 100. I use... (8 Replies)
Discussion started by: geomarine
8 Replies
MPSNNArithmeticGradientNode(3)				 MetalPerformanceShaders.framework			    MPSNNArithmeticGradientNode(3)

NAME
MPSNNArithmeticGradientNode SYNOPSIS
#import <MPSNNGraphNodes.h> Inherits MPSNNGradientFilterNode. Inherited by MPSNNAdditionGradientNode, MPSNNMultiplicationGradientNode, and MPSNNSubtractionGradientNode. Instance Methods (nonnull instancetype) - initWithSourceGradient:sourceImage:gradientState: (nonnull instancetype) - initWithGradientImages:forwardFilter:isSecondarySourceFilter: Class Methods (nonnull instancetype) + nodeWithSourceGradient:sourceImage:gradientState: Properties float primaryScale float secondaryScale float bias NSUInteger secondaryStrideInPixelsX NSUInteger secondaryStrideInPixelsY NSUInteger secondaryStrideInFeatureChannels float minimumValue float maximumValue bool isSecondarySourceFilter Method Documentation - (nonnull instancetype) initWithGradientImages: (NSArray< MPSNNImageNode * > *__nonnull) gradientImages(MPSNNFilterNode *__nonnull) filter(bool) isSecondarySourceFilter create a new arithmetic gradient node See also -[MPSCNNNeuronNode gradientFilterNodesWithSources:] for an easier way to do this. Parameters: gradientImages The input gradient from the 'downstream' gradient filter and the source input image from the forward pass (primary or secondary). filter The matching filter node from the forward pass. isSecondarySourceFilter The isSecondarySourceFilter property is used to indicate whether the arithmetic gradient filter is operating on the primary or secondary source image from the forward pass. - (nonnull instancetype) initWithSourceGradient: (MPSNNImageNode *__nonnull) sourceGradient(MPSNNImageNode *__nonnull) sourceImage(MPSNNBinaryGradientStateNode *__nonnull) gradientState create a new arithmetic gradient node See also -[MPSCNNNeuronNode gradientFilterNodesWithSources:] for an easier way to do this. Parameters: sourceGradient The input gradient from the 'downstream' gradient filter. sourceImage The source input image from the forward pass (primary or secondary). gradientState The gradient state produced by the concatenation filter, consumed by this filter. + (nonnull instancetype) nodeWithSourceGradient: (MPSNNImageNode *__nonnull) sourceGradient(MPSNNImageNode *__nonnull) sourceImage(MPSNNBinaryGradientStateNode *__nonnull) gradientState create a new arithmetic gradient node See also -[MPSCNNNeuronNode gradientFilterNodesWithSources:] for an easier way to do this. Parameters: sourceGradient The input gradient from the 'downstream' gradient filter. sourceImage The source input image from the forward pass (primary or secondary). gradientState The gradient state produced by the concatenation filter, consumed by this filter. Property Documentation - (float) bias [read], [write], [nonatomic], [assign] - (bool) isSecondarySourceFilter [read], [write], [nonatomic], [assign] - (float) maximumValue [read], [write], [nonatomic], [assign] - (float) minimumValue [read], [write], [nonatomic], [assign] - (float) primaryScale [read], [write], [nonatomic], [assign] - (float) secondaryScale [read], [write], [nonatomic], [assign] - (NSUInteger) secondaryStrideInFeatureChannels [read], [write], [nonatomic], [assign] - (NSUInteger) secondaryStrideInPixelsX [read], [write], [nonatomic], [assign] - (NSUInteger) secondaryStrideInPixelsY [read], [write], [nonatomic], [assign] Author Generated automatically by Doxygen for MetalPerformanceShaders.framework from the source code. Version MetalPerformanceShaders-100 Thu Feb 8 2018 MPSNNArithmeticGradientNode(3)
All times are GMT -4. The time now is 09:53 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy