Sponsored Content
Top Forums UNIX for Dummies Questions & Answers To compare first two columns in an excel file Post 302534413 by arunmanas on Tuesday 28th of June 2011 12:38:02 AM
Old 06-28-2011
To compare first two columns in an excel file

Hi All,

i have a excel sheet with two columns as below.

column1 column2
100 100
200 300
300 400
400 400
500 600

i need to compare the values these two columns and the output should be printed in the third column...if these values are equal the output should be green and if these vlues are not equal output value should be red.. please see the output format below..

column1 column2 column3
100 100 green
200 300 red
300 400 red
400 400 green
500 600 red

please help me in writing a unix code for the above requirement...

Thanks in advance.
Arun ManasSmilie
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

use awk to read randomly located columns in an excel file

Hi, I have an excel file that have a random count of columns/fields and what im trying to do is to only retrieve all the rows under 2 specific field headers. I can use the usually command for awk which is awk 'print{ $1 $2}' > output.txt, but the location of the 2 specific field headers is... (9 Replies)
Discussion started by: mdap
9 Replies

2. Shell Programming and Scripting

how to convert fields from a text file to excel columns

i have this file which has the following contents: ,-0.3000 ,-0.3000 ,-0.3000 ,-0.9000 ,-0.9000 ,-0.9000 i would like to get this: -0.3-0.9-0.3-0.9-0.3-0.9 so far i am trying: awk '{for(i=1; i<=NF; i++) {printf("%f\n",$i)}}' test1 > test2 any help... (4 Replies)
Discussion started by: npatwardhan
4 Replies

3. Shell Programming and Scripting

compare file columns

I need help in file comparision. I have two files in below format: FILE_A: ------- COL1 COL2 COL3 COL4 COL5 FILE_B: ------- COL1A COL1B COL1C COL1D COL1E i want to compare for a for each row in FILE_A and FILE_B COL1 of FILE_A with COL1B of FILE_B COL3 of FILE_A with COL1E of... (1 Reply)
Discussion started by: learnoutmore99
1 Replies

4. Shell Programming and Scripting

How to sort columns in excel(csv) file

i want sort columns with headers based on another file headers file1 eg: i'm having an empty file with only coumn names like lastname firstname title expirydate stlcno status etc... another file with same column names and some other as well but in different order... file2 eg:firstname... (2 Replies)
Discussion started by: Man83Nagesh
2 Replies

5. UNIX for Dummies Questions & Answers

How to delete columns with numbers in an excel file?

Dear all, I have one file (see below) with more then 100 columns and 2500 rows, and need only column which has GType in label with Alphabets, please help me to remove these columns with numbers. input file is n.201.GType n-201.Theta n-201.R n_1.GType n_1.Theta n_1.R... (6 Replies)
Discussion started by: AAWT
6 Replies

6. UNIX for Dummies Questions & Answers

Search for string in a file then compare it with excel files entry

All, i have a file text.log: cover6 cover3 cover2 cover4 other file is abc.log as : 0 0 1 0 Then I have a excel file result.xls that contains: Name Path Pass cover2 cover3 cover6 cover4 (1 Reply)
Discussion started by: Anamika08
1 Replies

7. Shell Programming and Scripting

Compare Multiple Columns in one file

Hello guys, I am quite new to Shell Scripting and I need help for this I have a CSV file like this: Requisition,Order,RequisitionLineNumber,OrderLineNumber REQ1,Order1,1,1 REQ1,Order1,1,3 REQ2,Order2,1,5 Basically what I want to do is compare the first 3 fields If all 3 fields are the same... (5 Replies)
Discussion started by: jeffreybsu
5 Replies

8. Shell Programming and Scripting

Compare two date columns in same file

Hi All, Need to compare two date columns from the filname FinalDate.txt. My data's are like below D_OT_START D_EXP_STR Amount 1/3/2012 1/3/2012 5000 6/21/2011 6/25/2011 6000 2/28/2011 2/28/2011 7000 7/16/2010 8/16/2010 8000 7/14/2010 10/26/2010 9000 ... (3 Replies)
Discussion started by: suresh_target
3 Replies

9. Shell Programming and Scripting

Need specific columns in a log file as excel.

Hi All... I am in need of few columns from a log file.. in .xls file... below is what i have tried. my log file has 16 colums with " ; " as delimiter, but i need randomn columns 1 2 3 4 5 6 10 11 16 in an excel. I tried to awk the columns with delimiter ; and it worked, below is the log... (5 Replies)
Discussion started by: nanz143
5 Replies

10. Shell Programming and Scripting

Reading specific range of columns in an Excel file

Hi All, I want to read an excel file. PFA excel, I want to read the cloumn from A to G and the V to AH starting from Row number 3. Please help me on this. (7 Replies)
Discussion started by: Abhisrajput
7 Replies
PRINTER_CREATE_FONT(3)							 1						    PRINTER_CREATE_FONT(3)

printer_create_font - Create a new font

SYNOPSIS
resource printer_create_font (string $face, int $height, int $width, int $font_weight, bool $italic, bool $underline, bool $strike- out, int $orientation) DESCRIPTION
The function creates a new font and returns a handle to it. A font is used to draw text. For an example see printer_select_font(3). PARAMETERS
o $face -$face must be a string specifying the font face. o $height -$height specifies the font height. o $width -$width specifies the font width. o $font_weight - The $font_weight specifies the font weight (400 is normal), and can be one of the following predefined constants. o PRINTER_FW_THIN: sets the font weight to thin (100). o PRINTER_FW_ULTRALIGHT: sets the font weight to ultra light (200). o PRINTER_FW_LIGHT: sets the font weight to light (300). o PRINTER_FW_NORMAL: sets the font weight to normal (400). o PRINTER_FW_MEDIUM: sets the font weight to medium (500). o PRINTER_FW_BOLD: sets the font weight to bold (700). o PRINTER_FW_ULTRABOLD: sets the font weight to ultra bold (800). o PRINTER_FW_HEAVY: sets the font weight to heavy (900). o $italic -$italic can be TRUE or FALSE, and sets whether the font should be italic. o $underline -$underline can be TRUE or FALSE, and sets whether the font should be underlined. o $strikeout -$strikeout can be TRUE or FALSE, and sets whether the font should be stroked out. o $orientaton -$orientation specifies a rotation. RETURN VALUES
Returns a font handle on success or FALSE on error. PHP Documentation Group PRINTER_CREATE_FONT(3)
All times are GMT -4. The time now is 05:39 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy