Sponsored Content
Top Forums Shell Programming and Scripting Script for extracting data from csv file based on column values. Post 302848219 by rdcwayx on Wednesday 28th of August 2013 08:29:18 PM
Old 08-28-2013
so what did you try? Here are hints.

-f FILENAME can be used to identify if the file is exist or not.

awk can be used to get the report.
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

extracting data from a .csv file

I have a .csv file equipment,bandtype abc,aws def,mmds ghi,umts jkl,mmds I can get the equipment from `hostname`. In my script i want to check what is the hostname. then see if it exists in the.csv file. if it does then i want to store the second parameter(bandtype) for the corresponding... (3 Replies)
Discussion started by: lassimanji
3 Replies

2. UNIX for Dummies Questions & Answers

Extracting rows from a text file based on numerical values of a column

I have a text file where the second column is a list of numbers going from small to large. I want to extract the rows where the second column is smaller than or equal to 0.0001. My input: rs10082730 9e-08 12 46002702 rs2544081 1e-07 12 46015487 rs1425136 1e-06 7 35396742 rs2712590... (1 Reply)
Discussion started by: evelibertine
1 Replies

3. UNIX for Dummies Questions & Answers

Extracting rows from a space delimited text file based on the values of a column

I have a space delimited text file. I want to extract rows where the third column has 0 as a value and write those rows into a new space delimited text file. How do I go about doing that? Thanks! (2 Replies)
Discussion started by: evelibertine
2 Replies

4. UNIX for Dummies Questions & Answers

Shell script to extract data from csv file based on certain conditions

Hi Guys, I am new to shell script.I need your help to write a shell script. I need to write a shell script to extract data from a .csv file where columns are ',' separated. The file has 5 columns having values say column 1,column 2.....column 5 as below along with their valuesm.... (1 Reply)
Discussion started by: Vivekit82
1 Replies

5. 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

6. 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

7. Shell Programming and Scripting

Remove the values from a certain column without deleting the Column name in a .CSV file

(14 Replies)
Discussion started by: dhruuv369
14 Replies

8. Linux

To get all the columns in a CSV file based on unique values of particular column

cat sample.csv ID,Name,no 1,AAA,1 2,BBB,1 3,AAA,1 4,BBB,1 cut -d',' -f2 sample.csv | sort | uniq this gives only the 2nd column values Name AAA BBB How to I get all the columns of CSV along with this? (1 Reply)
Discussion started by: sanvel
1 Replies

9. Shell Programming and Scripting

Extracting values based on line-column numbers from multiple text files

Dear All, I have to solve the following problems with multiple tab-separated text file but I don't know how. Any help would be greatly appreciated. I have access to Linux mint (but not as a professional). I have multiple tab-delimited files with the following structure: file1: 1 44 2 ... (5 Replies)
Discussion started by: Bastami
5 Replies
SIMSEARCH(1)							   User Commands						      SIMSEARCH(1)

NAME
simsearch - simsearch DESCRIPTION
usage: simsearch [-h] [-k K_NEAREST] [-t THRESHOLD] [-q QUERIES] [--hex-query HEX_QUERY] [--query-id QUERY_ID] [--in FORMAT] [-o FILENAME] [-c] [-b BATCH_SIZE] [--scan] [--memory] [--times] tar- get_filename Search an FPS file for similar fingerprints positional arguments: target_filename target filename optional arguments: -h, --help show this help message and exit -k K_NEAREST, --k-nearest K_NEAREST select the k nearest neighbors (use 'all' for all neighbors) -t THRESHOLD, --threshold THRESHOLD minimum similarity score threshold -q QUERIES, --queries QUERIES filename containing the query fingerprints --hex-query HEX_QUERY query in hex --query-id QUERY_ID id for the hex query --in FORMAT input query format (default uses the file extension, else 'fps') -o FILENAME, --output FILENAME output filename (default is stdout) -c, --count report counts -b BATCH_SIZE, --batch-size BATCH_SIZE batch size --scan scan the file to find matches (low memory overhead) --memory build and search an in-memory data structure (faster for multiple queries) --times report load and execution times to stderr simsearch 1.0 June 2012 SIMSEARCH(1)
All times are GMT -4. The time now is 09:51 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy