Sponsored Content
Full Discussion: Strip a string in sh
Top Forums Shell Programming and Scripting Strip a string in sh Post 302406609 by daPeach on Tuesday 23rd of March 2010 11:33:51 AM
Old 03-23-2010
use Parameter Expansion
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to strip strins

Guys, Please can someone tell me how to strip each string from the following ? TABLE1||METHOD||TYPE||STATUS||DATE What i need is to assign each value to the variable TABLE1 to var1 METHOD to var2 and so on If there is NULL in one of them, something like A||B||||C|| I want the... (14 Replies)
Discussion started by: kamathg
14 Replies

2. Shell Programming and Scripting

Strip all non-alphanumerics

Hi, Can someone let me know how do I strip out any non-alphanumeric character in string tomake it alphanumeric? i.e abc def ghi ->abcdefghi abc-def-ghi ->abcdefghi abc#def-ghi->abcdefghi Thanks in advance (3 Replies)
Discussion started by: braindrain
3 Replies

3. Shell Programming and Scripting

Need to strip a string

I have a file that looks like this: /home/fred/opt/bin /opt/usr/bin /usr/sbin/var/opt I need a way to chop of everything after the last occurance of the / sign including the /. So the file above will now look like this below. /home/fred/opt /opt/usr /usr/sbin/var I tried using... (6 Replies)
Discussion started by: x96riley3
6 Replies

4. Programming

Strip command

I am new in Unix. I go through the man strip. But did not understand that, why when we have -G (debug and release ) option in the compiler, than using strip command to strip the debug information from the objects. i want to binary for teh production i will compile it without debug option. What the... (4 Replies)
Discussion started by: Saurabh78
4 Replies

5. Shell Programming and Scripting

How to strip out common terms in string

Hi, I have this kinda of data:- 0,0,0,0,1,2,0,4,5,6,7,foo 0,0,0,0,1,4,0,5,5,5,5,foo1 0,0,6,0,1,6,0,6,1,2,3,orange etc... I wanted to remove the 0 which occur on the same rows of foo,foo1 and orange in this case. Desired output is:- 0,1,2,4,5,6,7,foo 0,1,4,5,5,5,5,foo1... (9 Replies)
Discussion started by: ahjiefreak
9 Replies

6. Shell Programming and Scripting

Strip out the string

awk -F"\t" -vOFS="\t" '{print $1"\t-\t-","",$6,$7"\t-"$8"\t-\t-\t"$15}' file.tsv > output.tsv Using the above command how to remove the string www.abc.com from the $7 value. (7 Replies)
Discussion started by: sandy1028
7 Replies

7. Solaris

strip error

Hi I am getting the below error while using strip command. strip: libelf error. Request error: no string table strip: a.out: file not manipulated Could somebody please let me know what might be the solution?? It is in ksh and solaris 10. Thanks in advance (4 Replies)
Discussion started by: vali__
4 Replies

8. Shell Programming and Scripting

Strip First few Characters

I want to strip first few characters from each record until a proper datesamp is found. Request for getNextPage.................06/29/12 07:49:30 VVUKOVIC@67.208.166.131{7A805FEF76A62FCBB23EA78B5380EF95.tomcat1}TP-Processor14 LogExchUsage: ERROR:: isprof=false : exch=NSDQ output should be... (2 Replies)
Discussion started by: ratheeshjulk
2 Replies

9. Shell Programming and Scripting

Strip leading and numbers from a string.

Hello I have two vars loaded with $VAR1="ISOMETHING103" $VAR2="COTHERTHING04" I need to: 1) Strip the first char. Could be sed 's/^.//' 2) The number has it's rules. If it has "hundreds", it needs to be striped. If it is just two digits it shouldn't. So, for VAR1 output should be... (7 Replies)
Discussion started by: tristezo2k
7 Replies
MPSNNNeuronDescriptor(3)				 MetalPerformanceShaders.framework				  MPSNNNeuronDescriptor(3)

NAME
MPSNNNeuronDescriptor SYNOPSIS
#import <MPSCNNNeuron.h> Inherits NSObject, and <NSCopying>. Instance Methods (nonnull instancetype) - init Class Methods (nonnull MPSNNNeuronDescriptor *) + cnnNeuronDescriptorWithType: (nonnull MPSNNNeuronDescriptor *) + cnnNeuronDescriptorWithType:a: (nonnull MPSNNNeuronDescriptor *) + cnnNeuronDescriptorWithType:a:b: (nonnull MPSNNNeuronDescriptor *) + cnnNeuronDescriptorWithType:a:b:c: (nonnull MPSNNNeuronDescriptor *) + cnnNeuronPReLUDescriptorWithData:noCopy: Properties MPSCNNNeuronType neuronType float a float b float c NSData * data Detailed Description This depends on Metal.framework The MPSNNNeuronDescriptor specifies a neuron descriptor. Supported neuron types: Neuron type 'none': f(x) = x Parameters: none ReLU neuron filter: f(x) = x >= 0 ? x : a * x This is called Leaky ReLU in literature. Some literature defines classical ReLU as max(0, x). If you want this behavior, simply pass a = 0. Parameters: a For default behavior, set the value of a to 0.0f. Linear neuron filter: f(x) = a * x + b Parameters: a, b For default behavior, set the value of a to 1.0f and the value of b to 0.0f. Sigmoid neuron filter: f(x) = 1 / (1 + e^-x) Parameters: none Hard Sigmoid filter: f(x) = clamp((x * a) + b, 0, 1) Parameters: a, b For default behavior, set the value of a to 0.2f and the value of b to 0.5f. Hyperbolic tangent (TanH) neuron filter: f(x) = a * tanh(b * x) Parameters: a, b For default behavior, set the value of a to 1.0f and the value of b to 1.0f. Absolute neuron filter: f(x) = fabs(x) Parameters: none Parametric Soft Plus neuron filter: f(x) = a * log(1 + e^(b * x)) Parameters: a, b For default behavior, set the value of a to 1.0f and the value of b to 1.0f. Parametric Soft Sign neuron filter: f(x) = x / (1 + abs(x)) Parameters: none Parametric ELU neuron filter: f(x) = x >= 0 ? x : a * (exp(x) - 1) Parameters: a For default behavior, set the value of a to 1.0f. Parametric ReLU (PReLU) neuron filter: Same as ReLU, except parameter aArray is per channel. For each pixel, applies the following function: f(x_i) = x_i, if x_i >= 0 = a_i * x_i if x_i < 0 i in [0...channels-1] i.e. parameters a_i are learned and applied to each channel separately. Compare this to ReLu where parameter a is shared across all channels. See https://arxiv.org/pdf/1502.01852.pdf for details. Parameters: aArray - Array of floats containing per channel value of PReLu parameter count - Number of float values in array aArray. ReLUN neuron filter: f(x) = min((x >= 0 ? x : a * x), b) Parameters: a, b As an example, the TensorFlow Relu6 activation layer can be implemented by setting the parameter b to 6.0f: https://www.tensorflow.org/api_docs/cc/class/tensorflow/ops/relu6. For default behavior, set the value of a to 1.0f and the value of b to 6.0f. Method Documentation + (nonnull MPSNNNeuronDescriptor*) cnnNeuronDescriptorWithType: (MPSCNNNeuronType) neuronType Make a descriptor for a MPSCNNNeuron object. Parameters: neuronType The type of a neuron filter. Returns: A valid MPSNNNeuronDescriptor object or nil, if failure. + (nonnull MPSNNNeuronDescriptor*) cnnNeuronDescriptorWithType: (MPSCNNNeuronType) neuronType(float) a Make a descriptor for a MPSCNNNeuron object. Parameters: neuronType The type of a neuron filter. a Parameter 'a'. Returns: A valid MPSNNNeuronDescriptor object or nil, if failure. + (nonnull MPSNNNeuronDescriptor*) cnnNeuronDescriptorWithType: (MPSCNNNeuronType) neuronType(float) a(float) b Initialize the neuron descriptor. Parameters: neuronType The type of a neuron filter. a Parameter 'a'. b Parameter 'b'. Returns: A valid MPSNNNeuronDescriptor object or nil, if failure. + (nonnull MPSNNNeuronDescriptor*) cnnNeuronDescriptorWithType: (MPSCNNNeuronType) neuronType(float) a(float) b(float) c Make a descriptor for a MPSCNNNeuron object. Parameters: neuronType The type of a neuron filter. a Parameter 'a'. b Parameter 'b'. c Parameter 'c'. Returns: A valid MPSNNNeuronDescriptor object or nil, if failure. + (nonnull MPSNNNeuronDescriptor*) cnnNeuronPReLUDescriptorWithData: (NSData *_Nonnull) data(bool) noCopy Make a descriptor for a neuron of type MPSCNNNeuronTypePReLU. The PReLU neuron is the same as a ReLU neuron, except parameter 'a' is per feature channel. Parameters: data A NSData containing a float array with the per feature channel value of PReLu parameter. The number of float values in this array usually corresponds to number of output channels in a convolution layer. The descriptor retains the NSData object. noCopy An optimization flag that tells us whether the NSData allocation is suitable for use directly with no copying of the data into internal storage. This allocation has to match the same restrictions as listed for the newBufferWithBytesNoCopy:length:options:deallocator: method of MTLBuffer. Returns: A valid MPSNNNeuronDescriptor object for a neuron of type MPSCNNNeuronTypePReLU or nil, if failure - (nonnull instancetype) init You must use one of the interfaces below instead. Property Documentation - (float) a [read], [write], [nonatomic], [assign] - (float) b [read], [write], [nonatomic], [assign] - (float) c [read], [write], [nonatomic], [assign] - (NSData*) data [read], [write], [nonatomic], [retain] - (MPSCNNNeuronType) neuronType [read], [write], [nonatomic], [assign] Author Generated automatically by Doxygen for MetalPerformanceShaders.framework from the source code. Version MetalPerformanceShaders-100 Thu Feb 8 2018 MPSNNNeuronDescriptor(3)
All times are GMT -4. The time now is 08:21 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy