Sponsored Content
Top Forums Shell Programming and Scripting Store command inside variable Post 302921399 by Corona688 on Thursday 16th of October 2014 05:14:46 PM
Old 10-16-2014
Also, it will assign the value of $u right then, and not get any "new" value when you use it later.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to Store command O/P to a variable...

Hi all.. I got a problem.. Its easy to redirect o/p to a file.. But Is it possible to redirect the O/P to a variable? For example: I've a command in my script: string1=cut -d ':' -f2 file.txt When I do: echo $string1 The value is empty... Pls suggest me how to store the value... (7 Replies)
Discussion started by: smartbuddy
7 Replies

2. Shell Programming and Scripting

how to store grep command in a Variable

I have a variable A echo $A 5060 I am exporting the value X,Y,Z and it id fetching right thing and When I run C=`${X} -l ${Y} ${Z} "trap '' INT;. ~/.profile >/dev/null 2>/dev/null; netstat -na | grep \$A`" here it is going to same directory and also running netstat -na | grep 5060 ... (4 Replies)
Discussion started by: madhusmita
4 Replies

3. Shell Programming and Scripting

How to use same variable value inside as well as outside of the awk command?

Hi Jim, The following script is in working state. But i m having one more problem with awk cmd. Could you tell me how to use any variable inside awk or how to take any variable value outside awk. My problem is i want to maintain one property file in which i am declaring variable value into that... (12 Replies)
Discussion started by: Ganesh Khandare
12 Replies

4. Shell Programming and Scripting

Store highest filename from ls command to a variable

I am sure it has been answered in some form or the other in this forum but trust me I have spent last couple of hours looking for an answer but can't find it. I want to do a very simple operation within my script. Let's say I have 4 files with the names file1.log, file2.log, file3.log and... (6 Replies)
Discussion started by: sssccc
6 Replies

5. Shell Programming and Scripting

Not able to store command inside a shell variable, and run the variable

Hi, I am trying to do the following thing var='date' $var Above command substitutes date for and in turn runs the date command and i am getting the todays date value. I am trying to do the same thing as following, but facing some problems, unique_host_pro="sed -e ' /#/d'... (3 Replies)
Discussion started by: gvinayagam
3 Replies

6. Shell Programming and Scripting

Using variable to store of find command

Hello Experts I am newbie to unix and writing one script to make archive files Problme i am facing is : I have used find command to find the type of files and I am storing find command results in a variable. When I echo the variable I can see that path is printed properly but when i am... (5 Replies)
Discussion started by: mitsyjohn
5 Replies

7. Shell Programming and Scripting

To store the file name o/p from find command in to a variable

Hi How to use a variable to store the filename of a file which was found by the 'find' command. can this be practical-->var = find . -name "filename.dat" Please help.. (1 Reply)
Discussion started by: ayyappaas
1 Replies

8. Shell Programming and Scripting

store last command exit status in variable in shell script

Hello All My req is to store the exit status of a command in shell variable I want to check whether the file has header or not The header will contain the string DATA_ACQ_CYC_CNTL_ID So I am running the command head -1 $i | grep DATA_ACQ_CYC_CNTL_ID Now I have to check if... (6 Replies)
Discussion started by: Pratik4891
6 Replies

9. Shell Programming and Scripting

How to store the return value of a command into a variable?

I want to store the return value of grep -c string filename into a variable, say count. How do I do that? For example if grep -c "string" "filename" shows 0 on executing it in the sh shell then I want to store this 0 in a variable. Is it possible? :D (5 Replies)
Discussion started by: navienavnav
5 Replies

10. Programming

Python - store output of command to a variable

I am trying to store output of python command in variable. Could you please help how I can do that ? For example I am executing the following command - "CentOS" in server_desc The output would be True or False I would like to store the output in a variable say outPut and use condition... (4 Replies)
Discussion started by: atanubanerji
4 Replies
MPSNNBinaryArithmeticNode(3)				 MetalPerformanceShaders.framework			      MPSNNBinaryArithmeticNode(3)

NAME
MPSNNBinaryArithmeticNode SYNOPSIS
#import <MPSNNGraphNodes.h> Inherits MPSNNFilterNode. Inherited by MPSNNAdditionNode, MPSNNDivisionNode, MPSNNMultiplicationNode, and MPSNNSubtractionNode. Instance Methods (nonnull instancetype) - initWithSources: (nonnull instancetype) - initWithLeftSource:rightSource: (nonnull Class) - gradientClass (MPSNNGradientFilterNode *__nonnull) - gradientFilterWithSources: (NSArray< MPSNNGradientFilterNode * > *__nonnull) - gradientFiltersWithSources: Class Methods (nonnull instancetype) + nodeWithSources: (nonnull instancetype) + nodeWithLeftSource:rightSource: Properties float primaryScale float secondaryScale float bias NSUInteger primaryStrideInPixelsX NSUInteger primaryStrideInPixelsY NSUInteger primaryStrideInFeatureChannels NSUInteger secondaryStrideInPixelsX NSUInteger secondaryStrideInPixelsY NSUInteger secondaryStrideInFeatureChannels float minimumValue float maximumValue Detailed Description virtual base class for basic arithmetic nodes Method Documentation - (nonnull Class) gradientClass - (NSArray <MPSNNGradientFilterNode*> * __nonnull) gradientFiltersWithSources: (NSArray< MPSNNImageNode * > *__nonnull) gradientImages create new arithmetic gradient nodes Create two new arithmetic gradient nodes - one that computes the gradient for the primary source image and one that computes the gradient for the secondary sourcefrom the inference pass. Reimplemented from MPSNNFilterNode. - (MPSNNGradientFilterNode*__nonnull) gradientFilterWithSources: (NSArray< MPSNNImageNode * > *__nonnull) gradientImages Return the gradient (backwards) version of this filter. The backwards training version of the filter will be returned. The non-gradient image and state arguments for the filter are automatically obtained from the target. Parameters: gradientImages The gradient images corresponding with the resultImage of the target Reimplemented from MPSNNFilterNode. - (nonnull instancetype) initWithLeftSource: (MPSNNImageNode *__nonnull) left(MPSNNImageNode *__nonnull) right init an arithemtic node with two sources Parameters: left the left operand right the right operand - (nonnull instancetype) initWithSources: (NSArray< MPSNNImageNode * > *__nonnull) sourceNodes init an arithemtic node with an array of sources Parameters: sourceNodes A valid NSArray containing two sources + (nonnull instancetype) nodeWithLeftSource: (MPSNNImageNode *__nonnull) left(MPSNNImageNode *__nonnull) right create an autoreleased arithemtic node with two sources Parameters: left the left operand right the right operand + (nonnull instancetype) nodeWithSources: (NSArray< MPSNNImageNode * > *__nonnull) sourceNodes create an autoreleased arithemtic node with an array of sources Parameters: sourceNodes A valid NSArray containing two sources Property Documentation - (float) bias [read], [write], [nonatomic], [assign] - (float) maximumValue [read], [write], [nonatomic], [assign] - (float) minimumValue [read], [write], [nonatomic], [assign] - (float) primaryScale [read], [write], [nonatomic], [assign] - (NSUInteger) primaryStrideInFeatureChannels [read], [write], [nonatomic], [assign] - (NSUInteger) primaryStrideInPixelsX [read], [write], [nonatomic], [assign] - (NSUInteger) primaryStrideInPixelsY [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 MPSNNBinaryArithmeticNode(3)
All times are GMT -4. The time now is 12:56 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy