Find the files and make them comma separated files

 
Thread Tools Search this Thread
Homework and Emergencies Homework & Coursework Questions Find the files and make them comma separated files
# 1  
Old 07-17-2011
Find the files and make them comma separated files

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!

1. The problem statement, all variables and given/known data:

Hi All,
I am new to unix, my requirement is like need to find the files like DATA_FUNCTION* and put those files into comma separated files.

2. Relevant commands, code, scripts, algorithms:



3. The attempts at a solution (include all code and scripts):



4. Complete Name of School (University), City (State), Country, Name of Professor, and Course Number (Link to Course):
JNTU, HYDERABAD, INDIA

Note: Without school/professor/course information, you will be banned if you post here! You must complete the entire template (not just parts of it).
# 2  
Old 07-18-2011
Try if this fills your requirment
Code:
find $PWD -type f -name 'DATA_FUNCTION*' | tr "\n" "," | sed "s/,$//g"

where $PWD is current directory you are running search from, can be any absolute or relative path.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

How to extract fields from a CSV i.e comma separated where some of the fields having comma as value?

can anyone help me!!!! How to I parse the CSV file file name : abc.csv (csv file) The above file containing data like abv,sfs,,hju,',',jkk wff,fst,,rgr,',',rgr ere,edf,erg,',',rgr,rgr I have a requirement like i have to extract different field and assign them into different... (4 Replies)
Discussion started by: J.Jena
4 Replies

2. Shell Programming and Scripting

awk to parse comma separated field and removing comma in between number and double quotes

Hi Experts, Please support I have below data in file in comma seperated, but 4th column is containing comma in between numbers, bcz of which when i tried to parse the file the column 6th value(5049641141) is being removed from the file and value(222.82) in column 5 becoming value of column6. ... (3 Replies)
Discussion started by: as7951
3 Replies

3. Shell Programming and Scripting

Make multiple lines into single quoted comma separated Linux

Hi, I want to change a file file1.txt: 1234 3456 2345 6789 3456 2333 4444 As, file2.txt in Linux: '1234','3456','2345','6789','3456','2333','4444' Could someone please help me. (Single liner sed, awk will be welcome!) (7 Replies)
Discussion started by: wiweq05
7 Replies

4. Shell Programming and Scripting

Make Separated files from a single matrix - Perl

Hey Masters, Here is my input: fragmentID chromosome start end HEL25E TRIP1 r5GATC2L00037 chr2L 5301 6026 0.03 0.036 r5GATC2L00038 chr2L 6023 6882 -0.025 -0.041 r5GATC2L00040 chr2R 6921 7695 -0.031 0.005 r5GATC2L00042 chr2R 7715 8554 -0.006 -0.024 r5GATC2L00043 chr3L 8551 8798 0.042 0... (4 Replies)
Discussion started by: @man
4 Replies

5. UNIX for Dummies Questions & Answers

[solved] Comma separated values to space separated

Hi, I have a large number of files which are written as csv (comma-separated values). Does anyone know of simple sed/awk command do achieve this? Thanks! ---------- Post updated at 10:59 AM ---------- Previous update was at 10:54 AM ---------- Guess I asked this too soon. Found the... (0 Replies)
Discussion started by: lost.identity
0 Replies

6. Shell Programming and Scripting

Need Help - comma inside double quote in comma separated csv,

Hello there, I have a comma separated csv , and all the text field is wrapped by double quote. Issue is some text field contain comma as well inside double quote. so it is difficult to process. Input in the csv file is , 1,234,"abc,12,gh","GH234TY",34 I need output like below,... (8 Replies)
Discussion started by: Uttam Maji
8 Replies

7. Shell Programming and Scripting

Finding difference in two comma separated files in UINX

Dear All, I have requirement like this: I have 2 camma seperated files file1: 1,aaa,bbb,ccc, 2,bbb,ccc,ddd, 3,ccc,ddd,eee, file2: 1,aaa,bbb,ccc, 2,bbb,ddd,ddd, 3,ccc,ddd,eee, my requirement is I should get message in the out put like: There is a difference in 3 rd filed in... (2 Replies)
Discussion started by: mymoto
2 Replies

8. Shell Programming and Scripting

Find all .htaccess files and make a backup copy in respective directories

Hey guys, I need to know how to locate all .htaccess files on the server and make a backup of them in the folder they reside before I run a script to modify all of them. So basically taking dir1/.htaccess and copying it as dir1/.htaccess_bk dir2/.htaccess copying as dir2/.htaccess_bk... (5 Replies)
Discussion started by: boxx
5 Replies

9. Shell Programming and Scripting

Need comma separated processing

I have a file like this OUTLN OPEN Y SCOTT OPEN N USER4 OPEN Y DBSNMP EXPIRED & LOCKED N ... (4 Replies)
Discussion started by: ilugopal
4 Replies

10. Shell Programming and Scripting

Deleting a column in multiple files that are comma separated

Hi, I have a directory that contains say 100 files named sequencially like input_1.25_50_C1.txt input_1.25_50_C2.txt input_1.25_50_C3.txt input_1.25_50_C4.txt .. .. .. input_1.25_50_C100.txt an example of the content in each of the file is: "NAME" "MEM.SHIP" "cgd1_10" "cgd1_10"... (9 Replies)
Discussion started by: Lucky Ali
9 Replies
Login or Register to Ask a Question