Sponsored Content
Top Forums Shell Programming and Scripting Read CSV column value based on column name Post 302371483 by steadyonabix on Sunday 15th of November 2009 06:40:16 AM
Old 11-15-2009
What have you tried so far?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

sorting csv file based on column selected

Hi all, in my csv file it'll look like this, and of course it may have more columns US to UK;abc-hq-jcl;multimedia UK to CN;def-ny-jkl;standard DE to DM;abc-ab-klm;critical FD to YM;la-yr-tym;standard HY to MC;la-yr-ytm;multimedia GT to KJ;def-ny-jrt;critical I would like to group... (4 Replies)
Discussion started by: tententen
4 Replies

2. Shell Programming and Scripting

extract csv based on column value

Hi I have a csv file which is below A,5 B,6 C,10 D,7 I want the values who's second column is greater than 7 say C,10 D,7 Help me please... Thanks, Maruth (3 Replies)
Discussion started by: maruthavanan
3 Replies

3. Shell Programming and Scripting

awk read column csv and search in other csv

hi, someone to know how can i read a specific column of csv file and search the value in other csv columns if exist the value in the second csv copy entire row with all field in a new csv file. i suppose that its possible using awk but i m not expertise thanks in advance (8 Replies)
Discussion started by: giankan
8 Replies

4. Shell Programming and Scripting

Read in 2-column CSV, output many files based on field

Is there a way to read in a two-columned CSV file, and based on the fields in 1st column, output many different files? The input/output looks something like: input.csv: call Call Mom. call Call T-Mobile. go Go home. go Go to school. go Go to gas station. play Play music. play Play... (4 Replies)
Discussion started by: pxalpine
4 Replies

5. Shell Programming and Scripting

Pick the column value based on another column from .csv file

My scenario is that I need to pick value from third column based on fourth column value, if fourth column value is 1 then first value of third column.Third column (2|3|4|6|1) values are cancatenated. Main imp point, in my .csv file, third column is having price value with comma (1,20,300), it has... (2 Replies)
Discussion started by: Ganesh L
2 Replies

6. Linux

Filter a .CSV file based on the 5th column values

I have a .CSV file with the below format: "column 1","column 2","column 3","column 4","column 5","column 6","column 7","column 8","column 9","column 10 "12310","42324564756","a simple string with a , comma","string with or, without commas","string 1","USD","12","70%","08/01/2013",""... (2 Replies)
Discussion started by: dhruuv369
2 Replies

7. Shell Programming and Scripting

Fetching values in CSV file based on column name

input.csv: Field1,Field2,Field3,Field4,Field4 abc ,123 ,xyz ,000 ,pqr mno ,123 ,dfr ,111 ,bbb output: Field2,Field4 123 ,000 123 ,111 how to fetch the values of Field4 where Field2='123' I don't want to fetch the values based on column position. Instead want to... (10 Replies)
Discussion started by: bharathbangalor
10 Replies

8. Shell Programming and Scripting

Compare two csv's with column based

Hi, I am having below two CSV's col_1,col_2,col_3 1,2,4 1,3,6 col_1,col_3,col2,col_5,col_6 1,2,3,4,5 1,6,3,,, I need to compare based on the columns where the mismatch is expected output col_1,col_2,col_3 1,2,4 (3 Replies)
Discussion started by: rohit_shinez
3 Replies

9. Shell Programming and Scripting

Get maximum per column from CSV file, based on date column

Hello everyone, I am using ksh on Solaris 10 and I'm gathering data in a CSV file that looks like this: 20170628-23:25:01,1,0,0,1,1,1,1,55,55,1 20170628-23:30:01,1,0,0,1,1,1,1,56,56,1 20170628-23:35:00,1,0,0,1,1,2,1,57,57,2 20170628-23:40:00,1,0,0,1,1,1,1,58,58,2... (6 Replies)
Discussion started by: ejianu
6 Replies

10. UNIX for Beginners Questions & Answers

Filtering records of a csv file based on a value of a column

Hi, I tried filtering the records in a csv file using "awk" command listed below. awk -F"~" '$4 ~ /Active/{print }' inputfile > outputfile The output always has all the entries. The same command worked for different users from one of the forum links. content of file I was... (3 Replies)
Discussion started by: sunilmudikonda
3 Replies
PERF-DIFF(1)							    perf Manual 						      PERF-DIFF(1)

NAME
perf-diff - Read perf.data files and display the differential profile SYNOPSIS
perf diff [baseline file] [data file1] [[data file2] ... ] DESCRIPTION
This command displays the performance difference amongst two or more perf.data files captured via perf record. If no parameters are passed it will assume perf.data.old and perf.data. The differential profile is displayed only for events matching both specified perf.data files. OPTIONS
-D, --dump-raw-trace Dump raw trace in ASCII. -m, --modules Load module symbols. WARNING: use only with -k and LIVE kernel -d, --dsos= Only consider symbols in these dsos. CSV that understands file://filename entries. -C, --comms= Only consider symbols in these comms. CSV that understands file://filename entries. -S, --symbols= Only consider these symbols. CSV that understands file://filename entries. -s, --sort= Sort by key(s): pid, comm, dso, symbol. -t, --field-separator= Use a special separator character and don't pad with spaces, replacing all occurrences of this separator in symbol names (and other output) with a . character, that thus it's the only non valid separator. -v, --verbose Be verbose, for instance, show the raw counts in addition to the diff. -f, --force Don't complain, do it. --symfs=<directory> Look for files with symbols relative to this directory. -b, --baseline-only Show only items with match in baseline. -c, --compute Differential computation selection - delta,ratio,wdiff (default is delta). See COMPARISON METHODS section for more info. -p, --period Show period values for both compared hist entries. -F, --formula Show formula for given computation. -o, --order Specify compute sorting column number. COMPARISON
The comparison is governed by the baseline file. The baseline perf.data file is iterated for samples. All other perf.data files specified on the command line are searched for the baseline sample pair. If the pair is found, specified computation is made and result is displayed. All samples from non-baseline perf.data files, that do not match any baseline entry, are displayed with empty space within baseline column and possible computation results (delta) in their related column. Example files samples: - file A with samples f1, f2, f3, f4, f6 - file B with samples f2, f4, f5 - file C with samples f1, f2, f5 Example output: x - computation takes place for pair b - baseline sample percentage o perf diff A B C baseline/A compute/B compute/C samples --------------------------------------- b x f1 b x x f2 b f3 b x f4 b f6 x x f5 o perf diff B A C baseline/B compute/A compute/C samples --------------------------------------- b x x f2 b x f4 b x f5 x x f1 x f3 x f6 o perf diff C B A baseline/C compute/B compute/A samples --------------------------------------- b x f1 b x x f2 b x f5 x f3 x x f4 x f6 COMPARISON METHODS
delta If specified the Delta column is displayed with value d computed as: d = A->period_percent - B->period_percent with: - A/B being matching hist entry from data/baseline file specified (or perf.data/perf.data.old) respectively. o period_percent being the % of the hist entry period value within single data file ratio If specified the Ratio column is displayed with value r computed as: r = A->period / B->period with: - A/B being matching hist entry from data/baseline file specified (or perf.data/perf.data.old) respectively. o period being the hist entry period value wdiff:WEIGHT-B,WEIGHT-A If specified the Weighted diff column is displayed with value d computed as: d = B->period * WEIGHT-A - A->period * WEIGHT-B o A/B being matching hist entry from data/baseline file specified (or perf.data/perf.data.old) respectively. o period being the hist entry period value o WEIGHT-A/WEIGHT-B being user suplied weights in the the -c option behind : separator like -c wdiff:1,2. o WIEGHT-A being the weight of the data file o WIEGHT-B being the weight of the baseline data file SEE ALSO
perf-record(1) perf 06/30/2014 PERF-DIFF(1)
All times are GMT -4. The time now is 02:17 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy