Sponsored Content
Top Forums Shell Programming and Scripting How to change a file's content by row? Post 302375923 by Scrutinizer on Monday 30th of November 2009 06:32:57 AM
Old 11-30-2009
You could write the result to a new file and then mv that new file to the old file.
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Need help to change the content for remote located file

Hi All, I have one file that sits on 4 diffrent servers, those servers are diffrent region based and they are authentication protected and that file has a diff port numbers, so when run the script it must ask my login details,region of server and port no for that file once it took from me... (1 Reply)
Discussion started by: tmarjuna
1 Replies

2. Shell Programming and Scripting

Need help to change the content for remote located file

Hi All, I have a file that sits on 4 diffrent servers, those servers are diffrent region based and they are authentication protected and that file has a diff port numbers, so when run the script it must ask my login details,region of server and port no for that file once it took from me it... (1 Reply)
Discussion started by: tmarjuna
1 Replies

3. Shell Programming and Scripting

Change file content based on data

I have a Transaction File coming into the system. In this file, in all records the relevant data is as follows- Position 1:10 -> Transaction Code Position 252:255 -> 4 digit business code Now based on these 2 fields I have to alter value in Transaction code (Position 1:10)... (6 Replies)
Discussion started by: varunrbs
6 Replies

4. Shell Programming and Scripting

Scan and change file data content problem

Input file >Read_1 XXXXXXXXXXSDFXXXXXDS (condition 1: After the last "X" per line, if the distance is less than or equal to 3 letter, replace those not "X" letter with "X") TREXXXXXXXSDFXXXXXDS (condition 2: Before the first "X" per line, if the distance is less than or equal to 3 letter,... (12 Replies)
Discussion started by: patrick87
12 Replies

5. Shell Programming and Scripting

Execution Problems with scan and change file data content

Input file >Read_1 XXXXXXXXXXSDFXXXXXDS ASDRXXXXXTGAGTXXXXXT TGTGATXXXXXAXXXXGXXA . . Desired output file >Read_1 XXXXXXXXXXXXXXXXXXDS ASDRXXXXXTGAGTXXXXXT TGTGATXXXXXXXXXXXXXA . . (5 Replies)
Discussion started by: patrick87
5 Replies

6. Linux

when SCP, does file content change?

Good day to you all, Just want to check here, i know when scping a file, size might change due to space issue. it might sound silly, but does file content get change too? if so, what kind of situation that might be? (1 Reply)
Discussion started by: ahtat99
1 Replies

7. Shell Programming and Scripting

Change the content of files but not change the date

I have 100 files in a directory , all the files have a word "error" and they are created in different date . Now I would like to change the word from "error" to "warning" , and keep the date of the files ( that means do not change the file creation date after change the word ) , can advise what can... (0 Replies)
Discussion started by: ust3
0 Replies

8. Shell Programming and Scripting

Change a file content format using awk

Hi, i have a file input.txt Continent North America Country USA Capital Washington D.C. Country Canada Capital Ottawa Continent South America Country Argentina Capital Buenos Aires Country Brazil Capital Brasília Coutry Colombia Capital Bogotá and i want to get an output.txt ... (3 Replies)
Discussion started by: fastlane3000
3 Replies

9. Shell Programming and Scripting

Change the file name and copy old file content to new file names.

Hi, I have a files in a directory as below :- ls -1 mqdepth-S1STC02 proc-mq-S1STC01 proc-mq-S1STC02 proc-mq-S1STC03 Whereever i have S1STC i need to copy them into new file with file name S2STC. expected output :- ls -1 mqdepth-S2STC02 proc-mq-S2STC01 proc-mq-S2STC02... (3 Replies)
Discussion started by: satishmallidi
3 Replies

10. Shell Programming and Scripting

Script to change the file content using some conditions

Hello, I would like to change the content of the file that has few blocks starts with 10 and ends with ";" File1.txt 10 bonuses D 20 MATCHED 30 UPD COL 40 (SOL=30) 20 NOT MATCHED 30 INS COL 40 (SOL=30) ; 10 bonuses D 20 MATCHED 30 UPD COL 40... (5 Replies)
Discussion started by: Mannu2525
5 Replies
MPSCNNArithmetic(3)					 MetalPerformanceShaders.framework				       MPSCNNArithmetic(3)

NAME
MPSCNNArithmetic SYNOPSIS
#import <MPSCNNMath.h> Inherits MPSCNNBinaryKernel. Inherited by MPSCNNAdd, MPSCNNDivide, MPSCNNMultiply, and MPSCNNSubtract. Instance Methods (nonnull instancetype) - initWithDevice: Properties float primaryScale float secondaryScale float bias NSUInteger primaryStrideInFeatureChannels NSUInteger secondaryStrideInFeatureChannels float minimumValue float maximumValue Additional Inherited Members Detailed Description This depends on Metal.framework The MPSCNNArithmetic filter takes two source images, a primary source image and a secondary source image, and outputs a single destination image. It applies an element-wise arithmetic operator to each pixel in a primary source image and a corresponding pixel in a secondary source image over a specified region. The supported arithmetic operators are the following: o Addition o Subtraction o Multiplication o Division This filter takes additional parameters: primaryScale, secondaryScale, and bias. The default value for primaryScale and secondaryScale is 1.0f. The default value for bias is 0.0f. This filter applies primaryScale, secondaryScale, and bias to the primary source pixel (x) and secondary source pixel (y) in the following way: o Addition: result = ((primaryScale * x) + (secondaryScale * y)) + bias o Subtraction: result = ((primaryScale * x) - (secondaryScale * y)) + bias o Multiplicaton: result = ((primaryScale * x) * (secondaryScale * y)) + bias o Division: result = ((primaryScale * x) / (secondaryScale * y)) + bias To clamp the result of an arithmetic operation, where result = clamp(result, minimumValue, maximumValue), set the minimumValue and maximumValue appropriately. The default value of minimumValue is -FLT_MAX. The default value of maximumValue is FLT_MAX. This filter also takes the following additional parameters: o primaryStrideInPixelsX, primaryStrideInPixelsY, primaryStrideInFeatureChannels o secondaryStrideInPixelsX, secondaryStrideInPixelsY, secondaryStrideInFeatureChannels These parameters can be used to control broadcasting for the data stored in the primary and secondary source images. For example, setting all strides for the primary source image to 0 will result in the primarySource image being treated as a scalar value. The only supported values are 0 or 1. The default value of these parameters is 1. The number of output feature channels remains the same as the number of input feature channels. You must use one of the sub-classes of MPSImageArithmetic. Method Documentation - (nonnull instancetype) initWithDevice: (nonnull id< MTLDevice >) device Standard init with default properties per filter type Parameters: device The device that the filter will be used on. May not be NULL. Returns: A pointer to the newly initialized object. This will fail, returning nil if the device is not supported. Devices must be MTLFeatureSet_iOS_GPUFamily2_v1 or later. Reimplemented from MPSCNNBinaryKernel. Reimplemented in MPSCNNAdd, MPSCNNSubtract, MPSCNNMultiply, and MPSCNNDivide. Property Documentation - (float) bias [read], [write], [nonatomic], [assign] - maximumValue [read], [write], [nonatomic], [assign] maximumValue is used to clamp the result of an arithmetic operation: result = clamp(result, minimumValue, maximumValue). The default value of maximumValue is FLT_MAX. - minimumValue [read], [write], [nonatomic], [assign] minimumValue is to clamp the result of an arithmetic operation: result = clamp(result, minimumValue, maximumValue). The default value of minimumValue is -FLT_MAX. - (float) primaryScale [read], [write], [nonatomic], [assign] - (NSUInteger) primaryStrideInFeatureChannels [read], [write], [nonatomic], [assign] - (float) secondaryScale [read], [write], [nonatomic], [assign] - (NSUInteger) secondaryStrideInFeatureChannels [read], [write], [nonatomic], [assign] Author Generated automatically by Doxygen for MetalPerformanceShaders.framework from the source code. Version MetalPerformanceShaders-100 Thu Feb 8 2018 MPSCNNArithmetic(3)
All times are GMT -4. The time now is 04:10 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy