Skip to main content

All Questions

0 votes
2 answers
209 views

Unable to separate valid and invalid file in unix script topic

I have three files named as a.csv, b.csv, and c.csv. a.csv has content 1234567,11111111111111111111111111111111111111111111111111 b.csv has content like 1234567845610111211111111111111111111111111 ...
gajalakshmi n's user avatar
1 vote
2 answers
79 views

Remove duplicates csv based on first value keeping the longest line between duplicates

I have many different csv files in a folder (megadrive.txt, snes.txt) like this: Aerial Assault (USA);Aerial Assault (USA);Sega Master System;;;;;;;;;0;;;;; Aerial Assault (USA);Aerial Assault (USA);...
Isabelle's user avatar
4 votes
3 answers
695 views

Parsing csv file to filter rows based on a matching set of characters from a column value

Consider the following csv file: A,3300 B,8440 B,8443 B,8444 C,304 C,404 M,5502 M,5511 The actual csv file is big (around 60,000 rows). I have only included a small version to describe ...
Marco's user avatar
  • 41
3 votes
3 answers
257 views

Text Manipulation - Transpose column into rows depending on the value

I want to write a code to be able to manipulate text on my CSV file which contains the following: 71w - Rus,51200 71w - Phi,307200 71w - Ukr,307200 71w - Ukr,51200 71w - Mic,102400 71w - Mic,51200 ...
Waltiki Sucaldino's user avatar
1 vote
1 answer
76 views

repeated value in .csv file

everybody, I've got this script that I've used without any problem until now, it uses two files in order to create a .csv, those two files came from another script and it contains information about ...
Cesar Alejandro Villegas Yepez's user avatar
2 votes
6 answers
3k views

Scripting to split a single CSV row into multiple

I need a script that can take a CSV file with that has a column of semicolon-delimited attributes, and break it into multiple rows to normalize that multi-valued attribute? Here is the scenario: ...
ps2005's user avatar
  • 23
-5 votes
2 answers
2k views

Merge two csvfiles by column header

I have two csv files: success.csv "ID","Legacy ID","Field1", "Field2" 1,1111,google,news 2,2222,yahoo,news error.csv "Legacy ID","Field1","Field2","Message" 3333,aol,news,"Failed to upload data" ...
surendra's user avatar
11 votes
5 answers
80k views

Parsing a delimited text file in bash as command arguments

I have a text file split up like so: field1,field2,field3 xield1,xield2,xield3 dield1,dield2,dield3 gield1,gield2,gield3 Each of these columns will be a parameter to a program, and I would like ...
Dean's user avatar
  • 111