add multiple columns to csv based on a column using bash [on hold]Single read filter csv based on 1st column...

Why aren't RCS openings an issue for spacecraft heat shields?

How is "sein" conjugated in this sub-sentence?

How to avoid using System.String with Rfc2898DeriveBytes in C#

Why did MS-DOS applications built using Turbo Pascal fail to start with a division by zero error on faster systems?

Can pay be witheld for hours cleaning up after closing time?

Is it appropriate for a prospective landlord to ask me for my credit report?

Is there a known non-euclidean geometry where two concentric circles of different radii can intersect? (as in the novel "The Universe Between")

Vacuum collapse -- why do strong metals implode but glass doesn't?

How should I face my manager if I make a mistake because a senior coworker explained something incorrectly to me?

Exctract year, month, day from datetime2

How would a situation where rescue is impossible be handled by the crew?

Were there 486SX revisions without an FPU on the die?

Was Tuvok bluffing when he said that Voyager's transporters rendered the Kazon weapons useless?

Can a character spend multiple hit dice at level 1?

Why did this happen to Thanos's ships at the end of "Avengers: Endgame"?

Ask for a paid taxi in order to arrive as early as possible for an interview within the city

Sleeping solo in a double sleeping bag

Is refusing to concede in the face of an unstoppable Nexus combo punishable?

Efficiently pathfinding many flocking enemies around obstacles

Is there any practical application for performing a double Fourier transform? ...or an inverse Fourier transform on a time-domain input?

The teacher logged me in as administrator for doing a short task, is the whole system now compromised?

If all stars rotate, why was there a theory developed, that requires non-rotating stars?

Are required indicators necessary for radio buttons?

Why is Boris Johnson visiting only Paris & Berlin if every member of the EU needs to agree on a withdrawal deal?



add multiple columns to csv based on a column using bash [on hold]


Single read filter csv based on 1st column valuesRemove Columns from a CSV FileAdd a column to a CSV that's a sum of the two previous columnsQuote first two columns in large .csv fileBash-search and replace-Merge columns in CSV fileMerge multiple lines column by column based on column 1 - same file?Using bash to swap first and second columns in CSVcsv filter on linux bashAdd Columns to .csv from Multiple FilesJoin two CSV files based on matching column data






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







0















I have a csv file:



test_1,2,data,hi,**2**,5-- 2 columns need to be added after 5
test_2,3,4,5,**1**,6- 1 column needs to be added after 6
test_1,3,7,8,**3**,7- 3 columns need to be added after 7


Output



test_1,2,data,hi,**2**,5,**data_1,data_2**
test_2,3,4,5,**1**,6,**data_1**
test_1,3,7,8,**3**,7,**data_1,data_2,data_3**


I want to add columns to the csv with data based on the 5th column in the field.



How do I do it using bash?










share|improve this question









New contributor



ShivaniSarin is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











put on hold as unclear what you're asking by Jeff Schaller yesterday


Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.















  • 1





    bash is a nice shell, but it's no CSV editor...

    – Jeff Schaller
    2 days ago











  • @JeffSchaller is right, bash is not the right tool for this job - use awk or perl or python. beyond that, it's impossible to answer because you haven't told us HOW the extra fields are to be derived from field 5, or where the extra data comes from.

    – cas
    yesterday


















0















I have a csv file:



test_1,2,data,hi,**2**,5-- 2 columns need to be added after 5
test_2,3,4,5,**1**,6- 1 column needs to be added after 6
test_1,3,7,8,**3**,7- 3 columns need to be added after 7


Output



test_1,2,data,hi,**2**,5,**data_1,data_2**
test_2,3,4,5,**1**,6,**data_1**
test_1,3,7,8,**3**,7,**data_1,data_2,data_3**


I want to add columns to the csv with data based on the 5th column in the field.



How do I do it using bash?










share|improve this question









New contributor



ShivaniSarin is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











put on hold as unclear what you're asking by Jeff Schaller yesterday


Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.















  • 1





    bash is a nice shell, but it's no CSV editor...

    – Jeff Schaller
    2 days ago











  • @JeffSchaller is right, bash is not the right tool for this job - use awk or perl or python. beyond that, it's impossible to answer because you haven't told us HOW the extra fields are to be derived from field 5, or where the extra data comes from.

    – cas
    yesterday














0












0








0








I have a csv file:



test_1,2,data,hi,**2**,5-- 2 columns need to be added after 5
test_2,3,4,5,**1**,6- 1 column needs to be added after 6
test_1,3,7,8,**3**,7- 3 columns need to be added after 7


Output



test_1,2,data,hi,**2**,5,**data_1,data_2**
test_2,3,4,5,**1**,6,**data_1**
test_1,3,7,8,**3**,7,**data_1,data_2,data_3**


I want to add columns to the csv with data based on the 5th column in the field.



How do I do it using bash?










share|improve this question









New contributor



ShivaniSarin is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











I have a csv file:



test_1,2,data,hi,**2**,5-- 2 columns need to be added after 5
test_2,3,4,5,**1**,6- 1 column needs to be added after 6
test_1,3,7,8,**3**,7- 3 columns need to be added after 7


Output



test_1,2,data,hi,**2**,5,**data_1,data_2**
test_2,3,4,5,**1**,6,**data_1**
test_1,3,7,8,**3**,7,**data_1,data_2,data_3**


I want to add columns to the csv with data based on the 5th column in the field.



How do I do it using bash?







text-processing csv






share|improve this question









New contributor



ShivaniSarin is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.










share|improve this question









New contributor



ShivaniSarin is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.








share|improve this question




share|improve this question








edited 2 days ago









Jeff Schaller

49.1k11 gold badges72 silver badges163 bronze badges




49.1k11 gold badges72 silver badges163 bronze badges






New contributor



ShivaniSarin is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.








asked 2 days ago









ShivaniSarinShivaniSarin

6




6




New contributor



ShivaniSarin is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




New contributor




ShivaniSarin is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.







put on hold as unclear what you're asking by Jeff Schaller yesterday


Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.











put on hold as unclear what you're asking by Jeff Schaller yesterday


Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.









put on hold as unclear what you're asking by Jeff Schaller yesterday


Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.










  • 1





    bash is a nice shell, but it's no CSV editor...

    – Jeff Schaller
    2 days ago











  • @JeffSchaller is right, bash is not the right tool for this job - use awk or perl or python. beyond that, it's impossible to answer because you haven't told us HOW the extra fields are to be derived from field 5, or where the extra data comes from.

    – cas
    yesterday














  • 1





    bash is a nice shell, but it's no CSV editor...

    – Jeff Schaller
    2 days ago











  • @JeffSchaller is right, bash is not the right tool for this job - use awk or perl or python. beyond that, it's impossible to answer because you haven't told us HOW the extra fields are to be derived from field 5, or where the extra data comes from.

    – cas
    yesterday








1




1





bash is a nice shell, but it's no CSV editor...

– Jeff Schaller
2 days ago





bash is a nice shell, but it's no CSV editor...

– Jeff Schaller
2 days ago













@JeffSchaller is right, bash is not the right tool for this job - use awk or perl or python. beyond that, it's impossible to answer because you haven't told us HOW the extra fields are to be derived from field 5, or where the extra data comes from.

– cas
yesterday





@JeffSchaller is right, bash is not the right tool for this job - use awk or perl or python. beyond that, it's impossible to answer because you haven't told us HOW the extra fields are to be derived from field 5, or where the extra data comes from.

– cas
yesterday










0






active

oldest

votes



















0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes

Popular posts from this blog

Hudson River Historic District Contents Geography History The district today Aesthetics Cultural...

The number designs the writing. Feandra Aversely Definition: The act of ingrafting a sprig or shoot of one...

Ayherre Geografie Demografie Externe links Navigatiemenu43° 23′ NB, 1° 15′ WL43° 23′ NB, 1°...