$ awk -F, 'FNR == NR && !/\// {T[$3]=1;next};T[$1] {print}' file1 file2 | awk -f matrx.awk file1 - file2
p1/p2:
s3 s4 s5 s6
v1 m b a a
v2 - m a b
p1/p3:
s7 s8 s9 s10
v2 b a m m
v3 m m b a
v4 m m a m
p2/p3:
s11 s12 s13 s14
v1 b a b m
v3 b b a m
v4 a m m b
Syntax: file1 - file2 is correct, hyphen (-) is output of awk commande before pipe (|)
Regards.
This User Gave Thanks to disedorgue For This Post:
Please someone I need information on how to change a Unix form/document into a microsoft word document in order to be emailed to another company. Please help ASAP. Thankyou :confused: (8 Replies)
Hi,
I have a file whose structure is like this
7
7
1 2 3 4 5
1 3 4 8 6
1 4 5 6 0
2 6 8 3 8
2 5 7 8 0
5 7 9 4 1
3 8 0 2 2
3 5 6 8
basically first two row tell the number of rows and column but the data following them are not arranged in that format. now i want to create another... (1 Reply)
I have large formatted data file with five columns. This has to be rearranged in lower order matrix form as shown below for sample data.
1 2 3 4 5
1.0
3.0 2.0
5.0 3.0 2.0
4.0 3.0 1.0 6.0
2.0 3.0 4.0 5.0 1.0
1.0 4.0 2.0 3.0 5.0
3.0 5.0 4.0 2.0 8.0
1.0 3.0 2.0 4.0 5.0
2.0... (7 Replies)
Hi
i have a file which have a pattern like this
Nov 10 session closed
Nov 10 Nov 9 08:14:27 EST5EDT 2010 on tty .
Nov 10 Oct 19 02:14:21 EST5EDT 2010 on pts/tk .
Nov 10 afrtetryytr
Nov 10 session closed
Nov 10 Nov 10 03:21:04 EST5EDT 2010
Dec 8 Nov 10 05:03:02 EST5EDT 2010
... (13 Replies)
Hi,
Some assistance with respect to the following problem will be very helpful.
I want to reformat my dataset in the following manner for subsequent analysis.
I have first column values (which repeat for each value of 2nd column) which are names, the second column specifies position ad the... (1 Reply)
I want to read a file contain sub-string and same string need to match in file name I got from for loop. I am using below code:
#!/bin/bash
C_UPLOADEDSUFFIX='.uploaded'
files=$(find . -iname '*'$C_UPLOADEDSUFFIX -type f) # find files having .uploaded prefix
for file in $files
do
... (1 Reply)
I need to form a matrix out of unbalanced set of records. First eliminate the sample that do not have at least 3 variables (col2). So, in the example, samples 4 and 5 get eliminated.
Then form a matrix of values (col3) from the samples using only variables that are present accross all samples.... (3 Replies)
Discussion started by: senhia83
3 Replies
LEARN ABOUT MINIX
pnmsmooth
pnmsmooth(1) General Commands Manual pnmsmooth(1)NAME
pnmsmooth - smooth out an image
SYNOPSIS
pnmsmooth [-size width height] [-dump dumpfile] [pnmfile]
DESCRIPTION
Smooths out an image by replacing each pixel with the average of its width X height neighbors. It is implemented as a C progam that gener-
ates a PGM convolution matrix and then invokes pnmconvol.
OPTIONS -size width height
Specifies the size of the convolution matrix. Default size is a 3x3 matrix. Width and height sizes must be odd. Maximum size of
convolution matrix is limited by the maximum value for a pixel such that (width * height * 2) must not exceed the maximum pixel
value.
-dump dumpfile
Generates and saves the convolution file only. Use of this option does not invoke pnmconvol.
SEE ALSO pnmconvol(1), pnm(5)AUTHORS
Copyright (C) 1989, 1991 by Jef Poskanzer.
Converted from script to C program December 1994 by Mike Burns (burns@chem.psu.edu).
4 December 1994 pnmsmooth(1)