Gurus,
I have one file which is having multiple columns and also this file is not always contain the exact columns; sometimes it contains 5 columns or 12 columns. Now, I need to find the difference from that particular file. Here is the sample file:
param1 | 10 | 20 | 30 |
param2 | 10 |... (6 Replies)
Hi guys,
I'm rather new at using UNIX based systems, and when it comes to scripting etc I'm even newer.
I have two files which i need to compare.
file1: (some random ID's)
451245
451288
136588
784522
file2: (random ID's + e-mail assigned to ID)
123888 xc@xc.com
451245 ... (21 Replies)
Hi friends,
My file is like:
Second file is :
I need to print the rows present in file one, but in order present in second file....I used
while read gh;do
awk ' $1=="' $gh'" {print >> FILENAME"output"} ' cat listoffirstfile
done < secondfile
but the output I am... (14 Replies)
I have two text files where the first three columns are exactly the same. I want to compare the fourth column of the text files and if the values are different, print that row into a new output file. How do I go about doing that?
File 1:
100 rs3794811 0.01 0.3434
100 rs8066551 0.01... (8 Replies)
Hi,
I have a space delimited text file that looks like the following:
Aa 100 200
Bb 300 100
Cc X 500
Dd 600 X
Basically, I want to take the average of columns 2 and 3 and print it in column 4. However if there is an X in either column 2 or 3, I want to print the non-X value. Therefore... (11 Replies)
Hi , I want to compare first 3 columns of File A and File B and create a new file File C which will have all rows from File B and will include rows that are present in File A and not in File B based on First 3 column comparison.
Thanks in advance for your help.
File A
A,B,C,45,46... (2 Replies)
Hi,
I need to find the difference between 2 files in unix and write the result in the new file
File1:
A
B
File2:
X 123 hajkd
Y 345 adjfka
A 123 djafjhd
B 678 dsndjks
Output file:
X 123 hajkd
Y 345 adjfka
Thanks. (6 Replies)
First I'd like to apologize if I opened a thread which is already open somewhere.
I did a bit of searching but could quite find what I was looking for, so I will try to explaing what I need.
I'm writing a script on our server, got to a point where I have two files with results. Example:
File1... (6 Replies)
Hello all, First post here. I did not notice a previous post to help me down the right path. I am looking to compare a column in a CSV file against another file (which is not a column match one for one) but more or less when a match is made, I would like to append a third column that contains a... (17 Replies)
Discussion started by: dis0wned
17 Replies
LEARN ABOUT PLAN9
pr
PR(1) General Commands Manual PR(1)NAME
pr - print file
SYNOPSIS
pr [ option ... ] [ file ... ]
DESCRIPTION
Pr produces a printed listing of one or more files on its standard output. The output is separated into pages headed by a date, the name
of the file or a specified header, and the page number. With no file arguments, pr prints its standard input.
Options apply to all following files but may be reset between files:
-n Produce n-column output.
+n Begin printing with page n.
-b Balance columns on last page, in case of multi-column output.
-d Double space.
-en Set the tab stops for input text every n spaces.
-h Take the next argument as a page header (file by default).
-in Replace sequences of blanks in the output by tabs, using tab stops set every n spaces.
-f Use formfeeds to separate pages.
-ln Take the length of the page to be n lines instead of the default 66.
-m Print all files simultaneously, each in one column.
-n Number the lines of each file.
-on Offset the left margin n character positions.
-sc Separate columns by the single character c instead of aligning them with white space. A missing c is taken to be a tab.
-t Do not print the 5-line header or the 5-line trailer normally supplied for each page.
-wn For multi-column output, take the width of the page to be n characters instead of the default 72.
SOURCE
/sys/src/cmd/pr.c
SEE ALSO cat(1), lp(1)PR(1)