Matching two fields in two csv files, create new file and append match
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 but has not returned any matches
file1 - (Print entire file to new file, match vlan fields)
file2: (Match VLAN field in file2 with Vlan field in file1 then append Name field to new file / file3 with the heading Vlan Name)
Desired output (file3)
Last edited by Scott; 09-21-2018 at 09:29 AM..
Reason: Added code tags to data
SHELL SCRIPT
Hi,
I have 3 separate files within a folder. Every File contains data in a single column like
File1 contains data
mayank
sushant
dheeraj
File2 contains
DSA_AT
MG_AT
FLAT_09
File3 contains data
123123
232323 (2 Replies)
I need to write a program to do something like a 'vlookup' in excel. I want to match data from file2 based on two fields (where both match) in file1, and for matching lines, add the data from two of the fields from file2 to file1.
If anyone knows something in perl or awk that can do this, I'd be... (20 Replies)
Hi,
I need help on appending certain field in my file1.txt based on matched patterns in file2.txt using awk or sed.
The blue color need to match with one of the data in field $2 in file2.txt. If match, BEGIN and FINISHED value in red will have a new value from field $3 and $4 accordingly.
... (1 Reply)
Dear List,
I have a file of csv data which has a different line per compliance check per host. I do not want any omissions from this csv data file which looks like this:
date,hostname,status,color,check
02-03-2012,COMP1,FAIL,Yellow,auth_pass_change... (3 Replies)
I need to take 2 input files and create 1 output based on matches from each file. I am looking to match field #1 in both files (Userid) and create an output file that will be a combination of fields from
both file1 and file2 if there are any differences in the fields 2,3,4,5,or 6.
Below is an... (5 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)
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:
SourceFile,DateTimeOriginal
/home/intannf/foto/IMG_0713.JPG,2015:02:17 11:14:07... (8 Replies)
I'm trying to use awk to count the occurrences of two matching fields of a CSV file.
For instance, for data that looks like this...
Joe,Blue,Yes,No,High
Mike,Blue,Yes,Yes,Low
Joe,Red,No,No,Low
Joe,Red,Yes,Yes,Low
I've been trying to use code like this...
countvar=`awk ' $2~/$color/... (4 Replies)
Trying to use awk to match the contents of each line in file1 with $5 in file2. Both files are tab-delimited and there may be a space or special character in the name being matched in file2, for example in file1 the name is BRCA1 but in file2 the name is BRCA 1 or in file1 name is BCR but in file2... (6 Replies)
I've written an awk script to compare two fields in two different files and then print portions of each file on the same line when matched. It works reasonably well, but every now and again, I notice some errors and cannot seem to figure out what the issue may be and am turning to you for help.
... (2 Replies)
Discussion started by: jvoot
2 Replies
LEARN ABOUT OPENSOLARIS
mxge
MXGE(4) BSD Kernel Interfaces Manual MXGE(4)NAME
mxge -- Myricom Myri10GE 10 Gigabit Ethernet adapter driver
SYNOPSIS
To compile this driver into the kernel, place the following lines in your kernel configuration file:
device firmware
device mxge
Alternatively, to load the driver as a module at boot time, place the following lines in loader.conf(5):
if_mxge_load="YES"
mxge_ethp_z8e_load="YES"
mxge_eth_z8e_load="YES"
mxge_rss_ethp_z8e_load="YES"
mxge_rss_eth_z8e_load="YES"
DESCRIPTION
The mxge driver provides support for PCI Express 10 Gigabit Ethernet adapters based on the Myricom LANai Z8E chip. The driver supports
Transmit/Receive checksum offload, Jumbo Frames, TCP segmentation offload (TSO) as well as Large Receive Offload (LRO). For further hardware
information, see http://www.myri.com/.
For questions related to hardware requirements, refer to the documentation supplied with your Myri10GE adapter. All hardware requirements
listed apply to use with FreeBSD.
Support for Jumbo Frames is provided via the interface MTU setting. Selecting an MTU larger than 1500 bytes with the ifconfig(8) utility
configures the adapter to receive and transmit Jumbo Frames. The maximum MTU size for Jumbo Frames is 9000.
For more information on configuring this device, see ifconfig(8).
HARDWARE
The mxge driver supports 10 Gigabit Ethernet adapters based on the Myricom LANai Z8E chips:
o Myricom 10GBase-CX4 (10G-PCIE-8A-C, 10G-PCIE-8AL-C)
o Myricom 10GBase-R (10G-PCIE-8A-R, 10G-PCIE-8AL-R)
o Myricom 10G XAUI over ribbon fiber (10G-PCIE-8A-Q, 10G-PCIE-8AL-Q)
LOADER TUNABLES
Tunables can be set at the loader(8) prompt before booting the kernel or stored in loader.conf(5).
hw.mxge.flow_control_enabled
Whether or not hardware flow control is enabled on the adapter. The default value is 1.
hw.mxge.intr_coal_delay
This value delays the generation of all interrupts in units of 1 microsecond. The default value is 30.
hw.mxge.skip_pio_read
This value determines whether or not the driver may omit doing a PIO read in the interrupt handler which ensures that the interrupt
line has been deasserted when using xPIC interrupts. A non-zero value may result in lower CPU overhead, however it may also result
in spurious interrupts. The default value is 0. This tunable has no effect when the device is using MSI or MSI-X interrupts.
hw.mxge.max_slices
This value determines the maximum number of slices the driver will attempt to use. The default value is 1. A slice is comprised of
a set of receive queues and an associated interrupt thread. When using multiple slices, the NIC hashes traffic to different slices
based on the value of hw.mxge.rss_hashtype. Using multiple slices requires that your motherboard and Myri10GE NIC both be capable of
MSI-X. Older Myri10GE NICs can be field upgraded to add MSI-X using the "10G NIC Tool Kit" for FreeBSD which is available from
http://www.myri.com/scs/download-10g-tools.html.
hw.mxge.rss_hashtype
This value determines how incoming traffic is steered to different slices. This tunable is ignored when using just a single slice.
The legal values for this tunable are:
1 Hash on the source and destination IPv4 addresses.
2 Hash on source and destination IPv4 addresses and if the packet is TCP, then also hash on the TCP source and destination ports.
4 Hash on the TCP or UDP source ports. This is the default value.
DIAGNOSTICS
mxge%d: Unable to allocate bus resource: memory A fatal initialization error has occurred.
mxge%d: Unable to allocate bus resource: interrupt A fatal initialization error has occurred.
mxge%d: Could not find firmware image %s The appropriate firmware kld module was not installed. This is a non-fatal initialization error,
but will result in running in a reduced performance mode.
SUPPORT
For general information and support, go to the Myricom support website at: http://www.myri.com/scs/.
If an issue is identified with the released source code on the supported kernel with a supported adapter, email the specific information
related to the issue to <help@myri.com>.
SEE ALSO altq(4), arp(4), netintro(4), ng_ether(4), ifconfig(8)HISTORY
The mxge device driver first appeared in FreeBSD 6.3.
AUTHORS
The mxge driver was written by Andrew Gallatin <gallatin@FreeBSD.org>.
BSD February 13, 2008 BSD