Compare 2 files of csv file and match column data and create a new csv file of them
Hi, I am newbie in shell script.
I need your help to solve my problem.
Firstly, I have 2 files of csv and i want to compare of the contents then the output will be written in a new csv file.
File1:
File2:
Output required:
Note:
The matched columns of both files are not written in the 'new' csv file i want to create.
In the file1, it has header file, while file2 doesn't have any header file. But, in the new csv file (output required), I want to create header file of each column.
and also, time and date of file1 is in same column (one column and separated by space), while time and date of file2 is in different different column (separated by comma).
Would you help me how to solve it? I am not sure how the shell script would be. But I am still learning. I really need your help. Sorry for my bad english, I hope you understand what I mean. Thank you.
Hi all,
Am new to scripting. So i just need your ideas to help me out. Here goes my requirement.
I have two csv files
1.csv 2.csv
abc,1.24 abc,1
def,2.13 def,1
I need to compare the first column of 1.csv with 2.csv and if matches then need to compare... (2 Replies)
I've got two large csv text table files with different number of columns each.
I have to compare them based on first two columns and create resulting file
that would in case of matched first two columns include all values from first one and all values (except first two colums) from second one. I... (5 Replies)
Hello everyone!!
I am not completely new to shell script but I havent been able to find the answer to my problem and I'm sure there are some smart brains here up for the challenge :D.
I have several CSV files that I need to combine into one, but I also need to know where each row came from.... (7 Replies)
Hi Friends,
I'm a great fan of this forum... it has helped me tone my skills in shell scripting. I have a challenge here, which I'm sure you guys would help me in achieving...
File A has a list of job ids and I need to compare this with the File B (*.log) and File C (extend *.log) and copy... (6 Replies)
Hi,
I have a file of csv data, which looks like this:
file1:
1AA,LGV_PONCEY_LES_ATHEE,1,\N,1,00020460E1,0,\N,\N,\N,\N,2,00.22335321,0.00466628
2BB,LES_POUGES_ASF,\N,200,200,00006298G1,0,\N,\N,\N,\N,1,00.30887539,0.00050312... (10 Replies)
I am running an ISQL command on Sybase DB and getting output of a query in an CSV file.
The issue is that all the data comes in to the same column, i want them to be separated in different columns.
SQL_COMMAND=command.sql
file=file.txt
formatFile=formatFile.txt
report=report.csv
echo... (1 Reply)
I am trying to parse two csv files and make a match in one column then print the entire file to a new file and append an additional column that gives description from the match to the new file. If a match is not made, I would like to add "NA" to the end of the file
Command that Ive been using... (6 Replies)
Example:
I have files in below format
file 1:
zxc,133,joe@example.com
cst,222,xyz@example1.com
File 2 Contains:
hxd
hcd
jws
zxc
cst
File 1 has 50000 lines and file 2 has around 30000 lines :
Expected Output has to be :
hxd
hcd
jws (5 Replies)
1.csv contains following column-
Empid code loc port
101 A xy 01
102 B zx 78
103 A cg 12
104 G xy 78
2.csv contains follwing data-
Empid code loc port
101 A gf 01
102 B zx 78
103 C cg 32
104 ... (1 Reply)
Discussion started by: rishabh
1 Replies
LEARN ABOUT PHP
gd_info
GD_INFO(3) 1 GD_INFO(3)gd_info - Retrieve information about the currently installed GD librarySYNOPSIS
array gd_info (void )
DESCRIPTION
Gets information about the version and capabilities of the installed GD library.
RETURN VALUES
Returns an associative array.
Elements of array returned by gd_info(3)
+-------------------+---------------------------------------------------+
| Attribute | |
| | |
| | Meaning |
| | |
+-------------------+---------------------------------------------------+
| GD Version | |
| | |
| | |
| | string value describing the installed libgd ver- |
| | sion. |
| | |
| FreeType Support | |
| | |
| | |
| | boolean value. TRUE if FreeType Support is |
| | installed. |
| | |
| FreeType Linkage | |
| | |
| | |
| | string value describing the way in which FreeType |
| | was linked. Expected values are: 'with freetype', |
| | 'with TTF library', and 'with unknown library'. |
| | This element will only be defined if FreeType |
| | Support evaluated to TRUE. |
| | |
| T1Lib Support | |
| | |
| | |
| | boolean value. TRUE if T1Lib support is |
| | included. |
| | |
| GIF Read Support | |
| | |
| | |
| | boolean value. TRUE if support for reading GIF |
| | images is included. |
| | |
|GIF Create Support | |
| | |
| | |
| | boolean value. TRUE if support for creating GIF |
| | images is included. |
| | |
| JPEG Support | |
| | |
| | |
| | boolean value. TRUE if JPEG support is included. |
| | |
| PNG Support | |
| | |
| | |
| | boolean value. TRUE if PNG support is included. |
| | |
| WBMP Support | |
| | |
| | |
| | boolean value. TRUE if WBMP support is included. |
| | |
| XBM Support | |
| | |
| | |
| | boolean value. TRUE if XBM support is included. |
| | |
| WebP Support | |
| | |
| | |
| | boolean value. TRUE if WebP support is included. |
| | |
+-------------------+---------------------------------------------------+
Note
Previous to PHP 5.3.0, the JPEG Support attribute was named JPG Support.
EXAMPLES
Example #1
Using gd_info(3)
<?php
var_dump(gd_info());
?>
The above example will output something similar to:
array(9) {
["GD Version"]=>
string(24) "bundled (2.0 compatible)"
["FreeType Support"]=>
bool(false)
["T1Lib Support"]=>
bool(false)
["GIF Read Support"]=>
bool(true)
["GIF Create Support"]=>
bool(false)
["JPEG Support"]=>
bool(false)
["PNG Support"]=>
bool(true)
["WBMP Support"]=>
bool(true)
["XBM Support"]=>
bool(false)
}
CHANGELOG
+--------+------------------------------------------------+
|Version | |
| | |
| | Description |
| | |
+--------+------------------------------------------------+
| 5.5.0 | |
| | |
| | |
| | WebP Support added. |
| | |
| 5.3.0 | |
| | |
| | |
| | JPG Support attribute renamed to JPEG Support. |
| | |
+--------+------------------------------------------------+
SEE ALSO imagepng(3), imagejpeg(3), imagegif(3), imagewbmp(3), imagetypes(3).
PHP Documentation Group GD_INFO(3)