Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Reduce the count on the 98 record by 2, Post 302535206 by yazu on Thursday 30th of June 2011 05:09:59 AM
Old 06-30-2011
Code:
% cat >testfile
98,+00000187865779787,00319,000000640/
99,+00000187865779787,00001,000000642/
app@kf3sv ~/tmp 
% awk  'BEGIN {FS=OFS=","} $1==98 {$4=sprintf("%0.9d/", $4-2)}1' testfile
98,+00000187865779787,00319,000000638/
99,+00000187865779787,00001,000000642/


Last edited by yazu; 06-30-2011 at 10:14 AM.. Reason: Better
This User Gave Thanks to yazu For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to count the record count in an EBCDIC file.

How do I get the record count in an EBCDIC file on a Linux Box. :confused: (1 Reply)
Discussion started by: oracle8
1 Replies

2. Shell Programming and Scripting

Need help with Isql record count

What I am trying to do is check if the database query returned any records. If no records returned then output a message else output results to a file. Right now if I take out the if and else statements the code runs fine and sends the email. If no records returned the email sends the column... (4 Replies)
Discussion started by: johnu122
4 Replies

3. Shell Programming and Scripting

record count

i have a file named file_names.dat where there are several files along with their path. exp: /data1/dir1/CTA_ACD_20071208.dat /data1/dir1/CTA_DFG_20071208.dat i want to write a script which will create a csv file with the name of the file and record count of that file the output file... (4 Replies)
Discussion started by: dr46014
4 Replies

4. Shell Programming and Scripting

replaying a record count with another record count

i use unix command to take the record count for a file1 awk 'END{print NR}' filename i already have a file2 which conatin the count like ... .. rec_cnt=100 .. .. I want to replace the record in the file2 using the record i take from file1. suggest me some simple ways of doing it... (2 Replies)
Discussion started by: er_zeeshan05
2 Replies

5. UNIX for Advanced & Expert Users

character count per record

Hello can someone please advise. I need to send records in a file that are over 10,000 characters long to a seperate file. Any ideas? Thanks (2 Replies)
Discussion started by: Dolph
2 Replies

6. Shell Programming and Scripting

Validate record count

Hi all How to verify the number of records in case of delimited file, If the file has records. And then if it is not equal to mentioned no. of records, email is triggered and file is moved to bad directory path. Example ----- input file = a.txt bad directory path : /usr/bin/bad (6 Replies)
Discussion started by: balaji23_d
6 Replies

7. Shell Programming and Scripting

Character count per record

I have a flat file. How can i retrive the character count per record in whole file. Can anybody assist me on this Cheers (9 Replies)
Discussion started by: subrat
9 Replies

8. Shell Programming and Scripting

Validating the record count

Hi , I am having a text file with several records., it has a header record and trailer record. The header record has the number of rows (records) found in the text file and time-stamp. The footer record has the total number of records ( along with the header and trailer., Suppose: wc -l... (4 Replies)
Discussion started by: cratercrabs
4 Replies

9. Shell Programming and Scripting

count of record in files

Hi all, I have written a scripts which count number of lines in all the files in a directory and write in a text file. I don't know how to format it while writing. OS suns solaris 10 my scripts is as below for i in /ersdg3/ERS/ERS_INPUT_LOGS/RIO/LOGS/RIO_02-Aug-2012/ *.LOG do echo... (11 Replies)
Discussion started by: guddu_12
11 Replies

10. UNIX for Dummies Questions & Answers

Reduce system inode count

I have lots of space on my system. linux-e30c:~ # df -h Filesystem Size Used Avail Use% Mounted on /dev/sda1 41G 3.4G 35G 9% / /dev/sda3 91G 36G 51G 42% /home /dev/sda2 99G 3.4G 91G 4% /usr But still somehow the inode count has almost finished... (3 Replies)
Discussion started by: rupeshkp728
3 Replies
MPSNNReduceUnary(3)					 MetalPerformanceShaders.framework				       MPSNNReduceUnary(3)

NAME
MPSNNReduceUnary SYNOPSIS
#import <MPSNNReduce.h> Inherits MPSCNNKernel. Inherited by MPSNNReduceColumnMax, MPSNNReduceColumnMean, MPSNNReduceColumnMin, MPSNNReduceColumnSum, MPSNNReduceFeatureChannelsMax, MPSNNReduceFeatureChannelsMean, MPSNNReduceFeatureChannelsMin, MPSNNReduceFeatureChannelsSum, MPSNNReduceRowMax, MPSNNReduceRowMean, MPSNNReduceRowMin, and MPSNNReduceRowSum. Instance Methods (nonnull instancetype) - initWithDevice: Properties MTLRegion clipRectSource Additional Inherited Members Detailed Description The MPSNNReduce performs a reduction operation The reduction operations supported are: o Reduce row min o Reduce column min o Reduce feature channels min o Reduce row max o Reduce column max o Reduce feature channels max o Reduce row mean o Reduce column mean o Reduce feature channels mean o Reduce row sum o Reduce column sum o Reduce feature channels sum 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 MPSCNNKernel. Reimplemented in MPSNNReduceFeatureChannelsSum, MPSNNReduceRowMin, MPSNNReduceColumnMin, MPSNNReduceFeatureChannelsMin, MPSNNReduceRowMax, MPSNNReduceColumnMax, MPSNNReduceFeatureChannelsMax, MPSNNReduceRowMean, MPSNNReduceColumnMean, MPSNNReduceFeatureChannelsMean, MPSNNReduceRowSum, and MPSNNReduceColumnSum. Property Documentation - clipRectSource [read], [write], [nonatomic], [assign] The source rectangle to use when reading data. A MTLRegion that indicates which part of the source to read. If the clipRectSource does not lie completely within the source image, the intersection of the image bounds and clipRectSource will be used. The clipRectSource replaces the MPSCNNKernel offset parameter for this filter. The latter is ignored. Default: MPSRectNoClip, use the entire source texture. Author Generated automatically by Doxygen for MetalPerformanceShaders.framework from the source code. Version MetalPerformanceShaders-100 Thu Feb 8 2018 MPSNNReduceUnary(3)
All times are GMT -4. The time now is 04:02 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy