Posts: 4,647
Threads: 1,494
Joined: Sep 2016
i often need a command to take particular columns of different files and combine them. for example i just needed to take columns 1-19 of file A and columns 20-EOL of file B and output it. line 37 would come from line 37 of both files.
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Posts: 4,647
Threads: 1,494
Joined: Sep 2016
(Mar-24-2018, 07:38 AM)wavic Wrote: You can try cut
or awk
so how to combine the multiple files into one?
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Posts: 4,647
Threads: 1,494
Joined: Sep 2016
Mar-26-2018, 11:29 PM
(This post was last modified: Mar-26-2018, 11:37 PM by Skaperen.)
(Mar-26-2018, 10:48 AM)DeaD_EyE Wrote: cat file1 file2 file3 file4 > final_file
and while cutting specified columns in each?
(Mar-26-2018, 08:23 AM)wavic Wrote: Hm! This will require some bash scripting and I am not aware of it. I think Pandas python module can do this.
I can try later to do some bash magic. It's embarrassing that I am using Linux for years and still don't know the bash scripting syntax.
i'd rather do new things in Python.
when did you start using Linux? i started in 1993. but i was using muliple Unix before then, and some even since then, so i had a head start.
(Mar-26-2018, 03:23 PM)nilamo Wrote: What's a "column"?
Are these csv files? Or is each character a different column? If it's each character, what about multi-byte characters?
Without example input/output, the likelihood of finding preexisting code is minimal.
some might be CSV files. i'm working on a design for a new command.
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.