Fill csv entire column with content from another text file


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Fill csv entire column with content from another text file
# 1  
Old 02-20-2015
Fill csv entire column with content from another text file

I have a csv that looks like this:

Code:
,yude-to-nap2,0,0,0,0,0
,2twis-yude-to-nap2,0,0,0,0,0
,2tiws-yude-to-nap2,0,0,0,0,0
,2arcos-yude-to-nap2,0,0,0,0,0


and another file named m1 that has a single line of text as content:
Feb 1 15:30:20

How can I fill the whole the empty column of the csv with the line of text within m1 ??

Last edited by vgersh99; 02-20-2015 at 12:20 PM.. Reason: code tags, please!
# 2  
Old 02-20-2015
Any attempts from your side?
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Perl script to fill the entire row of Excel file with color based on pattern match

Hi All , I have to write one Perl script in which I need to read one pre-existing xls and based on pattern match for one word in some cells of the XLS , I need to fill the entire row with one color of that matched cell and write the content to another excel Please find the below stated... (2 Replies)
Discussion started by: kshitij
2 Replies

2. Shell Programming and Scripting

Input file needs to match a column and print the entire line

I have a file with class c IP addresses that I need to match to a column and print the matching lines of another file. I started playing with grep -if file01.out file02.out but I am stuck as to how to match it to a column and print the matching lines; cat file01.out 10.150.140... (5 Replies)
Discussion started by: lewk
5 Replies

3. Shell Programming and Scripting

Compare 2 files of csv file and match column data and create a new csv file of them

Hi, I am newbie in shell script. I need your help to solve my problem. Firstly, I have 2 files of csv and i want to compare of the contents then the output will be written in a new csv file. File1: SourceFile,DateTimeOriginal /home/intannf/foto/IMG_0713.JPG,2015:02:17 11:14:07... (8 Replies)
Discussion started by: refrain
8 Replies

4. Shell Programming and Scripting

Grabbing entire content of file except spaces at the end

so i have several files that look somewhat like this: { "afafa": "afaf", "afafaa" : "" } <newline> <newline> i want to grab everything in the file except the empty new lines at the end. note, there may be newlines within the content itself. ( "afafa": "afaf",... (3 Replies)
Discussion started by: SkySmart
3 Replies

5. Shell Programming and Scripting

Delete an entire column from a tab delimited file

Hi, Can anyone please tell me about how we can delete an entire column from a tab delimited file? Mu input_file.txt looks like this: And I want the output as: I used the below code nawk -v d="1" 'BEGIN{FS=OFS="\t"}{$d=""}{print}' input_file.txtBut in the output, the first column is... (5 Replies)
Discussion started by: sampoorna
5 Replies

6. Shell Programming and Scripting

Separate lines in csv by column content (newbie)

Hello everyone I have a csv file organized just like in the following example: col1,col2,col3,CODE_0, ... , colN col1,col2,col3,CODE_0, ... , colN col1,col2,col3,CODE_1, ... , colN col1,col2,col3,CODE_1, ... , colN col1,col2,col3,CODE_1, ... , colN col1,col2,col3,CODE_2, ... , colN... (7 Replies)
Discussion started by: yomaya
7 Replies

7. UNIX for Dummies Questions & Answers

How to copy entire file content into another file being in last line mode of vi ?

How to copy entire file content into another file being in last line mode of vi ? ---------- Post updated at 10:07 AM ---------- Previous update was at 09:56 AM ---------- Got it : :1,30w file.txt (1 Reply)
Discussion started by: presul
1 Replies

8. Shell Programming and Scripting

Transpose an entire text file

Hello all, I want to transpose the rows of a file to the columns (every characters include spaces), i.e.: input: abcdefg 123 456 output: a1 b2 c3 d e4 f5 g6 I wrote a script: #!/bin/csh -f (15 Replies)
Discussion started by: heavenfish
15 Replies

9. UNIX for Advanced & Expert Users

Updating entire column irrespective of any data in a file

Hi, I have a file A.txt (tab separated) as below: pavan chennai/tes/bangalore 100 sunil mangalore/abc/mumbai 230 kumar delhi/nba/andhra 310 I want to change only second column as below . Rest of columns as it is ;The ouput file is also tab... (4 Replies)
Discussion started by: kpavan2004
4 Replies

10. Shell Programming and Scripting

To cut entire column from a file and apend it to another file as another column

file1.txt : india pakistan bangladesh japan canada africa USA srilanka Nepal file2.txt Delhi Tokyo washington I have to cut the first column of file1.txt and apend it with file2.txt as another column like this Delhi india Tokyo japan washington USA ... (4 Replies)
Discussion started by: sakthifire
4 Replies
Login or Register to Ask a Question