read output and store in file

Discussion in 'Python' started by b83503104@yahoo.com, Jul 11, 2005.

  1. Guest

    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.
     
    , Jul 11, 2005
    #1
    1. Advertising

  2. On 2005-07-11, <> wrote:

    > 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

    --
    Grant Edwards grante Yow! You can't hurt
    at me!! I have an ASSUMABLE
    visi.com MORTGAGE!!
     
    Grant Edwards, Jul 11, 2005
    #2
    1. Advertising

  3. tuxlover Guest

    use os.path.walk() or os.walk()

    Tuxlover
     
    tuxlover, Jul 11, 2005
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?UnVkeQ==?=

    to store or not to store an image

    =?Utf-8?B?UnVkeQ==?=, Mar 29, 2005, in forum: ASP .Net
    Replies:
    6
    Views:
    655
    =?Utf-8?B?UnVkeQ==?=
    Mar 30, 2005
  2. Justme
    Replies:
    9
    Views:
    619
    clayne
    Oct 1, 2006
  3. carmelo
    Replies:
    4
    Views:
    326
    Jim Langston
    Mar 2, 2008
  4. Sintek
    Replies:
    1
    Views:
    491
    Sintek
    May 3, 2009
  5. Kev
    Replies:
    5
    Views:
    149
Loading...

Share This Page