Hi I have one file which is containing about 5000 rows and 20 columns
I will just explain about my requirement here briefly with sample file, I have attached also, please help....me..
consider 1st column only
here 1st station profile is 5 to 25, script has copy or cut 5 rows in a file, and to paste it in new file...
2nd profile starts from 0 to 25 script has copy or cut 6 rows in a file, and to paste it in another new file...
3rd profile starts from 3 to 20 script has copy or cut 5 rows in a file, and to paste it in another new file... till the end of file
I don't understand what a station profile is nor how a shell script is supposed to figure out what lines to ignore and what lines to copy into the new files.
Scrutinizer's awk script makes a perfectly reasonable assumption that you want to take each grouping of lines with increasing values in the 1st column into separate files. But, you say that the 1st new file should contain 5 rows while Scrutinizer's awk script will make newfile_1 contain 6 rows. You say that the 2nd new file should contain 6 rows, but Scrutinizer's awk script will make newfile_2 contain 7 rows. The only match is that you say the the 3rd new file should contain 5 rows and Scrutinizer's script will print 5 rows into newfile_3.
Please explain what logic should be used to produce the output you want AND please post the output that you believe should appear in those three files (in CODE tags).
I am trying to cut the first 10 characters from a file only if the file has 'xyz' in field 185-188.
I tried this
cat filename | cut -c1-10
but this gives me all the records regardless of what is in field 185-188.
Is this doable ?
Thanks in advance for responses. (2 Replies)
Hi gurus,
I have set of files in a directory
ex : test_file1.csv
test_file2.csv
test_file3.csv
my requirement is to copy these files into another directory but with date appended to the name :
like after copying the files should look like : test_file1_07072008.csv
... (7 Replies)
Hi Guys,
I need help in modifying a large text file containing more than 1-2 lakh rows of data using unix commands. I am quite new to the unix language
the text file contains data in a pipe delimited format
sdfsdfs
sdfsdfsd
START_ROW
sdfsd|sdfsdfsd|sdfsdfasdf|sdfsadf|sdfasdf... (9 Replies)
hye there...
i have a problem to copy file in specific folder
that will change the name according to
host,time(%m%s) and date(%Y%M%D)
example folder name:
host_20100531.154101801
this folder name will always change...
but i just want to copy the AAA.txt and BBB.txt file..
really need... (17 Replies)
I know this is a complicated question but I will try to illustrate it with some data. I have a data file that looks like the following:
1341 NA06985 0 0 2 46.6432798439
1341 NA06991 NA06993 NA06985 2 48.8478948517
1341 NA06993 0 0 1 45.8022601455
1340 NA06994 0 0 1 48.780669145
1340... (1 Reply)
Hi everyone,
I will appreciate a lot if anyone can help me about a simple issue.
I have a data file, and I need to remove some rows with a given condition.
So here is a part of my data file:
5,14,1,3,3,0,0,-0.29977188269E+01
5,16,1,4,4,0,0,0.30394279900E+02... (4 Replies)
Hi ALL,
I have two file. I need to combine these two file based on a layout.
I used the below code and able to extract the record. But now able to insert that to a 3'rd file in between the extract
FILE 1
CAID NUMBER 1-20
TID NUMBER 21-22
LABEL CHAR 23-44
BASE 45-60... (5 Replies)
Discussion started by: arunkumar_mca
5 Replies
LEARN ABOUT MOJAVE
mpsmatrixdescriptor
MPSMatrixDescriptor(3) MetalPerformanceShaders.framework MPSMatrixDescriptor(3)NAME
MPSMatrixDescriptor
SYNOPSIS
#import <MPSMatrixTypes.h>
Inherits NSObject.
Class Methods
(__nonnull instancetype) + matrixDescriptorWithDimensions:columns:rowBytes:dataType:
(__nonnull instancetype) + matrixDescriptorWithRows:columns:rowBytes:dataType:
(__nonnull instancetype) + matrixDescriptorWithRows:columns:matrices:rowBytes:matrixBytes:dataType:
(size_t) + rowBytesFromColumns:dataType:
(size_t) + rowBytesForColumns:dataType:
Properties
NSUInteger rows
NSUInteger columns
NSUInteger matrices
MPSDataType dataType
NSUInteger rowBytes
NSUInteger matrixBytes
Detailed Description
This depends on Metal.framework
A MPSMatrixDescriptor describes the sizes, strides, and data type of a an array of 2-dimensional matrices. All storage is assumed to be in
'matrix-major'. See the description for MPSMatrix for further details.
Method Documentation
+ (__nonnull instancetype) matrixDescriptorWithDimensions: (NSUInteger) rows(NSUInteger) columns(NSUInteger) rowBytes(MPSDataType) dataType
Create a MPSMatrixDescriptor with the specified dimensions and data type.
Parameters:
rows The number of rows of the matrix.
columns The number of columns of the matrix.
rowBytes The number of bytes between starting elements of consecutive rows. Must be a multiple of the element size.
dataType The type of the data to be stored in the matrix.
For performance considerations the optimal row stride may not necessarily be equal to the number of columns in the matrix. The MPSMatrix
class provides a method which may be used to determine this value, see the rowBytesForColumns API in the MPSMatrix class. The number of
matrices described is initialized to 1.
+ (__nonnull instancetype) matrixDescriptorWithRows: (NSUInteger) rows(NSUInteger) columns(NSUInteger) matrices(NSUInteger)
rowBytes(NSUInteger) matrixBytes(MPSDataType) dataType
Create a MPSMatrixDescriptor with the specified dimensions and data type.
Parameters:
rows The number of rows of a single matrix.
columns The number of columns of a single matrix.
matrices The number of matrices in the MPSMatrix object.
rowBytes The number of bytes between starting elements of consecutive rows. Must be a multiple of the element size.
matrixBytes The number of bytes between starting elements of consecutive matrices. Must be a multiple of rowBytes.
dataType The type of the data to be stored in the matrix.
For performance considerations the optimal row stride may not necessarily be equal to the number of columns in the matrix. The MPSMatrix
class provides a method which may be used to determine this value, see the rowBytesForColumns API in the MPSMatrix class.
+ (__nonnull instancetype) matrixDescriptorWithRows: (NSUInteger) rows(NSUInteger) columns(NSUInteger) rowBytes(MPSDataType) dataType
+ (size_t) rowBytesForColumns: (NSUInteger) columns(MPSDataType) dataType
+ (size_t) rowBytesFromColumns: (NSUInteger) columns(MPSDataType) dataType
Return the recommended row stride, in bytes, for a given number of columns.
Parameters:
columns The number of columns in the matrix for which the recommended row stride, in bytes, is to be determined.
dataType The type of matrix data values.
To achieve best performance the optimal stride between rows of a matrix is not necessarily equivalent to the number of columns. This method
returns the row stride, in bytes, which gives best performance for a given number of columns. Using this row stride to construct your array
is recommended, but not required (provided that the stride used is still large enough to allocate a full row of data).
Property Documentation
- columns [read], [write], [nonatomic], [assign]
The number of columns in a matrix.
- dataType [read], [write], [nonatomic], [assign]
The type of the data which makes up the values of the matrix.
- matrices [read], [nonatomic], [assign]
The number of matrices.
- matrixBytes [read], [nonatomic], [assign]
The stride, in bytes, between corresponding elements of consecutive matrices. Must be a multiple of rowBytes.
- rowBytes [read], [write], [nonatomic], [assign]
The stride, in bytes, between corresponding elements of consecutive rows. Must be a multiple of the element size.
- rows [read], [write], [nonatomic], [assign]
The number of rows in a matrix.
Author
Generated automatically by Doxygen for MetalPerformanceShaders.framework from the source code.
Version MetalPerformanceShaders-100 Thu Feb 8 2018 MPSMatrixDescriptor(3)