hello community,
Say we have the following structure in our filesystem:

dir1 dir2 dir3 dir4
dir stands for directory of course. In dir1, there is a file1.txt that has in it numbers, like below
6576576 898798789 5645436549 76567576576 876876876876

Same goes for dir2. In dir2, there is a file2.txt, that has in it numbers, like below

6576576 89879878963 56454365492 765675765763 8768768768765

And so on, with all the rest of the folders. What we need to do, is have a new file (like an index) out of all directories and files values, like below:

dir1;6576576,898798789,5645436549,76567576576,876876876876 dir2;6576576,89879878963,56454365492,765675765763,8768768768765
And secondly, another index file, which will have the reverse info
6576576;dir1,dir2

Any ideas on how would you approach this?
Best


In reply to creating an index of files contents by nirelit

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.