read output and store in file

B

b83503104

Hi,

I'm a beginner, and what I want to accomplish is this:

1. For all files under several folders, do some processing (using an
existing program). The program will output one line of text for each
file.

2. Store the output of all files in one file.

It would be great if someone can give me a crash start on accomplishing
this. If you think there is a definitely better tool than Python for
doing this, please tell me so. I just heard that Python or Perl are
better in these kind of jobs.

Thanks.
 
G

Grant Edwards

I'm a beginner, and what I want to accomplish is this:

1. For all files under several folders, do some processing (using an
existing program). The program will output one line of text for each
file.

2. Store the output of all files in one file.

It would be great if someone can give me a crash start on accomplishing
this. If you think there is a definitely better tool than Python for
doing this, please tell me so. I just heard that Python or Perl are
better in these kind of jobs.

Using bash and find:

(find path1 path2 path3 -type f -exec existingProgram {} \;) >outputFile
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,012
Latest member
RoxanneDzm

Latest Threads

Top