Sponsored Content
Full Discussion: .csv file manipulation
Top Forums Shell Programming and Scripting .csv file manipulation Post 302907379 by Corona688 on Friday 27th of June 2014 12:06:23 PM
Old 06-27-2014
Code:
awk -F, -v OFS="," '
$7 ~ /VoIS Community Sharecall/ { $12=($10*0.19)/60 }
$7 ~ /VoIS Contact Sharecall Overflow/ { $12=($10*0.4)/60 }
{ $13=($13*0.5)/60 }
{ print }' inputfile > outputfile

 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

csv file manipulation

Hi, I generated a csv file.But i have to manipulate it to make it user friendly. This is the structure of the input csv file. partyfailurereasonnumbercvfrejected12cvfapproved45cvfonhold23mvcunknown98mvconcall17pucapproved78puchold34actunknown19 The first line is the header. The... (6 Replies)
Discussion started by: amit.behera
6 Replies

2. Shell Programming and Scripting

csv manipulation

Hi, I want to delete the null values that are present in all the columns except the last column $ cat x.csv baseball,NULL,8798765,Most played,0,5,12367,NULL,NULL,98,67,Reason is not sufficient baseball,NULL,8928192,Most played,0,4,76893,NULL,RAW,54,78,NULL baseball,NULL,5678945,Most... (6 Replies)
Discussion started by: scripter12
6 Replies

3. Shell Programming and Scripting

Awk to convert a text file to CSV file with some string manipulation

Hi , I have a simple text file with contents as below: 12345678900 971,76 4234560890 22345678900 5971,72 5234560990 32345678900 71,12 6234560190 the new csv-file should be like: Column1;Column2;Column3;Column4;Column5 123456;78900;971,76;423456;0890... (9 Replies)
Discussion started by: FreddyDaKing
9 Replies

4. Shell Programming and Scripting

CSV data format manipulation

Hi There I need a script which will pick up the data from a .CSV file and reformat it as per the requirement and write it to another .CSV file. I am using an application that will only take data in a particular format and need something that will convert without manual intervention. The... (4 Replies)
Discussion started by: rbggbr16
4 Replies

5. Shell Programming and Scripting

Data Manipulation on a .csv file

Hallo Friends, I need you help. My file has 5000 or so lines and currently looks like below(sample). Service Type,Origin,Destination,Rate Per Minute,Minimum Charge,Time Based Rate,Time Based From Day,Time Based To Day,Time Based From Time,Time Based To Time,Destination Prefix List,, VoIS... (3 Replies)
Discussion started by: kekanap
3 Replies

6. Shell Programming and Scripting

Pax1.csv file manipulation

Hallo Team and happy Friday, I have a .csv file attached called MHG_Only_Billing_only_great_201408_SummaryDetails.csv The file is as below: $ cat MHG_Only_Billing_only_great_201408_SummaryDetails.csv... (1 Reply)
Discussion started by: kekanap
1 Replies

7. Shell Programming and Scripting

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: SourceFile,DateTimeOriginal /home/intannf/foto/IMG_0713.JPG,2015:02:17 11:14:07... (8 Replies)
Discussion started by: refrain
8 Replies

8. Shell Programming and Scripting

Save output of updated csv file as csv file itself

Hi, all I want to sort a csv file based on timestamp from oldest to newest and save the output as csv file itself. Here is an example of my csv file. test.csv SourceFile,DateTimeOriginal /home/intannf/foto/IMG_0739.JPG,2015:02:17 11:32:21 /home/intannf/foto/IMG_0749.JPG,2015:02:17 11:37:28... (10 Replies)
Discussion started by: refrain
10 Replies

9. Shell Programming and Scripting

Save output of updated csv file as csv file itself, part 2

Hi, I have another problem. I want to sort another csv file by the first field. result.csv SourceFile,Airspeed,GPSLatitude,GPSLongitude,Temperature,Pressure,Altitude,Roll,Pitch,Yaw /home/intannf/foto5/2015_0313_090651_219.JPG,0.,-7.77223,110.37310,30.75,996.46,148.75,180.94,182.00,63.92 ... (2 Replies)
Discussion started by: refrain
2 Replies
cdoc(1) 						      General Commands Manual							   cdoc(1)

Name
       cdoc - invokes CDA Converter

Syntax
       cdoc [ -s format ] [ -d format ] [ -O options_file ] [ -o outputfile ] inputfile

Description
       The command converts the revisable format file, inputfile, to another revisable format or to a final form file.	If inputfile is not speci-
       fied, reads from standard input.  Unless a destination file is specified with the -o option, the command writes files to standard output.

Options
       -s format	   Specifies the format of inputfile and invokes an appropriate input converter as part of CDA. The ddif, dtif, dots  (for
			   analysis  output  only) and text converters are provided in the base system kit.  Additional converters can be added by
			   the CDA Converter Library and other layered products.  Converter Library and other layered products.  Contact your sys-
			   tem manager for a complete list of the input formats supported on your system. The default format is ddif.

       -d format	   Specifies  the  format  of outputfile and invokes an appropriate output converter as part of CDA. The ddif, dtif, text,
			   analysis, and ps converters are provided in the base system kit. Additional converters can be added	by  the  CDA  Con-
			   verter  Library  and other layered products. Contact your system manager for a complete list of the output formats sup-
			   ported on your system.  The default format is ddif.

       -O options_file	   Names the file passed to the input and output converters to control specific processing  options  for  each	converter.
			   Refer to your documentation set for a description of converter options.

			   The	options  file  has a default file type of .cda_options. Each line of the options file specifies a format name that
			   can optionally be followed by _input or _output to restrict the option to either an input or output converter. The sec-
			   ond	word  is  a valid option preceded by one or more spaces, tabs, or a slash (/) and can contain upper- and lowercase
			   letters, numbers, dollar signs, and underlines. The case of letters is not significant. If an option requires a  value,
			   then spaces, tabs, or an equal sign can separate the option from the value.

			   Each  line  can  optionally be preceded by spaces and tabs and can be terminated by any character other than those that
			   can be used to specify the format names and options. The syntax and interpretation of the text that follows the  format
			   name is specified by the supplier of the front and back end converters for the specified format.

			   To  specify several options for the same input or output format, specify one option on a line. If an invalid option for
			   an input or output format or an invalid value for an option is specified, the option may be ignored or an error message
			   may	be  returned.  Each  input or output format that supports processing options specifies any restrictions or special
			   formats required when specifying options.

			   By default, any messages that occur during processing of the options file are written  to  the  system  standard  error
			   location.  For those input and output formats that support a LOG option, messages can be directed to a log file.

       -o outputfile	   Specifies the name of the output file.  If not specified, writes to standard output.

See Also
       vdoc(1), dxvdoc(1X), DDIF(5), DTIF(5), DOTS(5), CDA(5)

																	   cdoc(1)
All times are GMT -4. The time now is 12:42 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy