With spaces inside your fields there's no chance to have spaces as delimiters and tell one field from the other reliably. What you could do is replace all whitespace in tmp2 by a regex that would allow you to match the relevant data in tmp1. Try
If you have multiple lines in tmp2 and read that file into an array a, you need to run a for (i in a) loop and check matches in that loop.
Hi,
From the pattern mentioned below remove lines based on pattern range.
Conditions
1 Look For all lines starting with ALTER TABLE and Ending with ; and contains the word MOVE.I wanto to remove these lines from the file sample below.
Note : The above pattern list could be found in... (1 Reply)
Hi Gurus,
I have a file say for ex. file1 which has 3500 lines in it which are different account numbers and another file (file2) which has 230000 lines in it. I want to read all the lines in file1 and delete all those lines from file2 which has that same pattern as in file1. I am not quite... (4 Replies)
I have a very large file (10,000,000 lines), that contains a sample id and a property of that sample. I have another file that contains around 1,000,000 lines with sample ids that I want to remove from the original file (create a new file without these lines).
I know how to do this in Perl, but it... (9 Replies)
I am new to shell scripting and need some help. I googled, but couldn't find a similar scenario.
Basically, I need to rename a datafile. This is the scenario -
I have a file, readonly.txt that has 2 columns - file# and name.
I have another file,missing_files.txt that has id and name. Both the... (3 Replies)
Dear all,
I need to search multiple patterns and then I need to print their respective next lines. For an example, in the below table, I will look for 3 different patterns :
1) # ATC_Codes:
2) # Generic_Name:
3) # Drug_Target_1_Gene_Name:
#BEGIN_DRUGCARD DB00001
# AHFS_Codes:... (3 Replies)
Hi,
i have been trying to extract multiple lines based on two different patterns as below:-
file1
@jkm|kdo|aas012|192.2.3.1 blablbalablablkabblablabla
sjfdsakfjladfjefhaghfagfkafagkjsghfalhfk
fhajkhfadjkhfalhflaffajkgfajkghfajkhgfkf
jahfjkhflkhalfdhfwearhahfl
@jkm|sdf|wud08q|168.2.1.3... (8 Replies)
How can I quickly print out lines in a datafile which has presence of both patterns in a row of another file. Maybe awk can do it much faster than bash.
Patternfile
ID1 PAT11 PAT12
ID1 PAT21 PAT22
ID2 PAT31 PAT32
datafile
headerline... (2 Replies)
Hi
I need to egrep patterns in a file and limit number of matches to print for each matched pattern.
-m10 option is not working out in my sun solaris 5.10
Please guide me the options to achieve.
if i do head -10 , i wont be getting all pattern match results as output since for a... (10 Replies)
In the awk below I am trying to output those lines that Match between file1 and file2, those Missing in file1, and those missing in file2. Using each $1,$2,$4,$5 value as a key to match on, that is if those 4 fields are found in both files the match, but if those 4 fields are not found then missing... (0 Replies)
File2 is tab-delimeted and I am trying to use $2 in file1 (space delimeted) as a search term in file2. If it is found then the AF= in and the FDP= values from file2 are extracted and printed next to the file1 line. I commented the awk before I added the lines in bold the current output resulted. I... (7 Replies)
Discussion started by: cmccabe
7 Replies
LEARN ABOUT SUNOS
mlib_matrixtranspose_s16c
mlib_MatrixTranspose_U8(3MLIB) mediaLib Library Functions mlib_MatrixTranspose_U8(3MLIB)NAME
mlib_MatrixTranspose_U8, mlib_MatrixTranspose_U8C, mlib_MatrixTranspose_S8, mlib_MatrixTranspose_S8C, mlib_MatrixTranspose_S16,
mlib_MatrixTranspose_S16C, mlib_MatrixTranspose_S32, mlib_MatrixTranspose_S32C - matrix transpose, in place
SYNOPSIS
cc [ flag... ] file... -lmlib [ library... ]
#include <mlib.h>
mlib_status mlib_MatrixTranspose_U8(mlib_u8 *xz, mlib_s32 mn);
mlib_status mlib_MatrixTranspose_U8C(mlib_u8 *xz, mlib_s32 mn);
mlib_status mlib_MatrixTranspose_S8(mlib_s8 *xz, mlib_s32 mn);
mlib_status mlib_MatrixTranspose_S8C(mlib_s8 *xz, mlib_s32 mn);
mlib_status mlib_MatrixTranspose_S16(mlib_s16 *xz, mlib_s32 mn);
mlib_status mlib_MatrixTranspose_S16C(mlib_s16 *xz, mlib_s32 mn);
mlib_status mlib_MatrixTranspose_S32(mlib_s32 *xz, mlib_s32 mn);
mlib_status mlib_MatrixTranspose_S32C(mlib_s32 *xz, mlib_s32 mn);
DESCRIPTION
Each of these functions performs an in-place transpose of a square matrix.
For real data, the following pseudo code applies:
for (i = 1; i < mn; i++) {
for (j = 0; j < i; i++) {
tmp = xz[i*mn + j];
xz[i*mn + j] = xz[j*mn + i];
xz[j*mn + i] = tmp;
}
}
For complex data, the following pseudo code applies:
for (i = 1; i < mn; i++) {
for (j = 0; j < i; i++) {
tmp0 = xz[2*(i*mn + j)];
tmp1 = xz[2*(i*mn + j) + 1];
xz[2*(i*mn + j)] = xz[2*(j*mn + i)];
xz[2*(i*mn + j) + 1] = xz[2*(j*mn + i) + 1];
xz[2*(j*mn + i)] = tmp0;
xz[2*(j*mn + i) + 1] = tmp1;
}
}
PARAMETERS
Each of the functions takes the following arguments:
xz Pointer to the source and destination matrix.
mn Number of rows and columns in the matrix.
RETURN VALUES
Each of the functions returns MLIB_SUCCESS if successful. Otherwise it returns MLIB_FAILURE.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Evolving |
+-----------------------------+-----------------------------+
|MT-Level |MT-Safe |
+-----------------------------+-----------------------------+
SEE ALSO mlib_MatrixTranspose_U8(3MLIB), attributes(5)SunOS 5.10 10 Nov 2004 mlib_MatrixTranspose_U8(3MLIB)