Sponsored Content
Top Forums Shell Programming and Scripting Inserting blank columns in already present CSV file Post 302903897 by omkar.jadhav on Friday 30th of May 2014 11:55:33 AM
Old 05-30-2014
thanks a trillion Akshay Hegde.

I have a final request to let me kbnow the logic behind this awk script as i will be using the same login to make this happen for csv which have almost 200 fileds or the changes i have to make in the script if i have to make the column values as black mean to say NULL values. so result should be csv containing 200 fileds which will be combination of colums which have headers alongwith their values and columns which will have header but no values that is NULL.

thanks again for the help you provided.

---------- Post updated at 10:55 AM ---------- Previous update was at 10:42 AM ----------

also i have tried to run the script but got the below output on Rhel machine:

PHP Code:
cat csv
,abcame,CI Description,CI Ref,SerialNumber,Last Report Time
<blank>,<blank>,VMware-42 2b cb d6 e7 36 ec 73-f4 77 bd 2b f2 6f 25 5d,VMware-42 2b cb d6 e7 36 ec 73-f4 77 bd 2b f2 6f 25 5d,"Fri,<blank>, 30 May 2014 12:23:13 +0000"
<blank>,<blank>,VMware-42 2b 79 e0 da 18 2e 9e-17 b2 6e e1 67 df 3c 6b,VMware-42 2b 79 e0 da 18 2e 9e-17 b2 6e e1 67 df 3c 6b,"Fri,<blank>, 30 May 2014 12:26:08 +0000" 
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Inserting 2 columns from a file to another with nawk

Hello all, I have these 2 files File1 123 100 456 200 789 300 File2 |1|2|3||4|5||6| |1|2|3||4|5||6| |1|2|3||4|5||6| I need an output like : |1|2|3|123|4|5|100|6| |1|2|3|456|4|5|200|6| |1|2|3|789|4|5|300|6| (3 Replies)
Discussion started by: rany1
3 Replies

2. Shell Programming and Scripting

How to remove Blank rows in a csv file

Hi, I need help to remove blank rows at the end of file. Sample data: "Oslo, Symra kino",Oslo,130-7,Symra 1,130-7-91 "Tønsberg, Brygga Kino SF",Tønsberg,202-1,Tønsberg SF 4,202-1-4 ,,,, ,,,, ,,,, ,,,, Expected data: "Oslo, Symra kino",Oslo,130-7,Symra 1,130-7-91 "Tønsberg, Brygga... (6 Replies)
Discussion started by: cnraja
6 Replies

3. UNIX for Advanced & Expert Users

Help in Deleting columns and Renaming Mutliple columns in a .Csv File

Hi All, i have a .Csv file in the below format startTime, endTime, delta, gName, rName, rNumber, m2239max, m2239min, m2239avg, m100016509avg, m100019240max, metric3min, m100019240avg, propValues 11-Mar-2012 00:00:00, 11-Mar-2012 00:05:00, 300.0, vma3550a, a-1_CPU Index<1>, 200237463, 0.0,... (9 Replies)
Discussion started by: mahi_mayu069
9 Replies

4. Shell Programming and Scripting

Inserting additional comma delimiters in a csv file, after and before certian fields.

Hello I have a csv file which I need to insert addtional commas into. The csv is of the format field1,field2,field3,field4,...etc...,field13,field14 I need to add extra commas in each record so that the final output looks like ... (1 Reply)
Discussion started by: kamal_p_99
1 Replies

5. Shell Programming and Scripting

Deleting all the fields(columns) from a .csv file if all rows in that columns are blanks

Hi Friends, I have come across some files where some of the columns don not have data. Key, Data1,Data2,Data3,Data4,Data5 A,5,6,,10,, A,3,4,,3,, B,1,,4,5,, B,2,,3,4,, If we see the above data on Data5 column do not have any row got filled. So remove only that column(Here Data5) and... (4 Replies)
Discussion started by: ks_reddy
4 Replies

6. Shell Programming and Scripting

Inserting new fields to a csv file

hi I have a csv file with few rows > cat job_stat 1,jobname1,somthing,somthing 2,jobname2,somthing,somthing 3,jobname3,somthing,somthing 4,jobname4,somthing,somthing I want to add few columns after the 2nd column and then append rest of the columns after the 3rd newly added... (3 Replies)
Discussion started by: midhun19
3 Replies

7. Shell Programming and Scripting

Randomly inserting extra columns into csv file

Hi Tech Guru, I have a test file as below , which needs some more fields to be populated randomly : dks3243;12;20130823;1420;25m;0;syt dks3243;rocy;10 dks3243;kiop;18 sde21p4;77;20151210;8479;7py;9;vfr sde21p4;temp;67 sfq6i01;12;20120123;3412;4rd;7;jui sfq6i01;uymk;90 sfq6i01;kiop;51 ... (8 Replies)
Discussion started by: Lokesha
8 Replies

8. Shell Programming and Scripting

Match columns from two csv files and update field in one of the csv file

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)
Discussion started by: djoseph
10 Replies

9. Shell Programming and Scripting

Detect blank spaces in a CSV file

I'm monitoring a WLAN network to keep track of new SSIDs popping up. The SSIDs are stored along with the AP MAC address and a few other parameters in a CSV file. A typical line could look like this: 18:70:9f:e3:80:aa 10:11:15 MyNetwork 2437 Now, the problem is that some networks use SSIDs... (4 Replies)
Discussion started by: Zooma
4 Replies

10. UNIX for Beginners Questions & Answers

Inserting a blank line at the end of a .txt file?

Hi there, I am having this problem: a) I am uploading a txt file from windows (notepad) with some Gaussian 09 command lines; b) Gaussian needs in certain command files, that those files have a blank line at the end of the file! c) I open the command file with vi and no blank line at the of... (2 Replies)
Discussion started by: luismga
2 Replies
VMX(4)							   BSD Kernel Interfaces Manual 						    VMX(4)

NAME
vmx -- VMware VMXNET3 Virtual Interface Controller device SYNOPSIS
To compile this driver into the kernel, place the following line in your kernel configuration file: device vmx Alternatively, to load the driver as a module at boot time, place the following line in loader.conf(5): if_vmx_load="YES" DESCRIPTION
The vmx driver provides support for the VMXNET3 virtual NIC available in virtual machines by VMware. It appears as a simple Ethernet device but is actually a virtual network interface to the underlying host operating system. This driver supports the VMXNET3 driver protocol, as an alternative to the emulated pcn(4), em(4) interfaces also available in the VMware environment. The vmx driver is optimized for the virtual machine, it can provide advanced capabilities depending on the underlying host operating system and the physical network interface controller of the host. The vmx driver supports features like multiqueue support, IPv6 checksum offloading, MSI/MSI-X support and hardware VLAN tagging in VMware's VLAN Guest Tagging (VGT) mode. The vmx driver supports VMXNET3 VMware virtual NICs provided by the virtual machine hardware version 7 or newer, as provided by the following products: o VMware ESX/ESXi 4.0 and newer o VMware Server 2.0 and newer o VMware Workstation 6.5 and newer o VMware Fusion 2.0 and newer For more information on configuring this device, see ifconfig(8). MULTIPLE QUEUES
The vmx driver supports multiple transmit and receive queues. Multiple queues are only supported by certain VMware products, such as ESXi. The number of queues allocated depends on the presence of MSI-X, the number of configured CPUs, and the tunables listed below. FreeBSD does not enable MSI-X support on VMware by default. The hw.pci.honor_msi_blacklist tunable must be disabled to enable MSI-X support. LOADER TUNABLES
Tunables can be set at the loader(8) prompt before booting the kernel or stored in loader.conf(5). hw.vmx.txnqueue hw.vmx.X.txnqueue Maximum number of transmit queues allocated by default by the driver. The default value is 8. The maximum supported by the VMXNET3 virtual NIC is 8. hw.vmx.rxnqueue hw.vmx.X.rxnqueue Maximum number of receive queues allocated by default by the driver. The default value is 8. The maximum supported by the VMXNET3 virtual NIC is 16. hw.vmx.txndesc hw.vmx.X.txndesc Number of transmit descriptors allocated by the driver. The default value is 512. The value must be a multiple of 32, and the maxi- mum is 4096. hw.vmx.rxndesc hw.vmx.X.rxndesc Number of receive descriptors per ring allocated by the driver. The default value is 256. The value must be a multiple of 32, and the maximum is 2048. There are two rings so the actual usage is doubled. EXAMPLES
The following entry must be added to the VMware configuration file to provide the vmx device: ethernet0.virtualDev = "vmxnet3" SEE ALSO
altq(4), arp(4), em(4), netintro(4), ng_ether(4), pcn(4), vlan(4), ifconfig(8) AUTHORS
The vmx driver was ported from OpenBSD and significantly rewritten by Bryan Venteicher <bryanv@freebsd.org>. The OpenBSD driver was written by Tsubai Masanari. BSD
March 17, 2014 BSD
All times are GMT -4. The time now is 02:57 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy