I have done as you suggested (did you?).
And my observation is that
ls ./*/* reports first on files that are
one level below the current directory, i.e. files in
the immediate sub-directories
(which is what I want). And in
addition
ls seems to automatically recurse if
given a wildcard. So it also reports recursively
on sub-directories of
those one-level-down directories. My explanation:
. the current directory
/* all dirs in next level down
/* all files in those dirs
and recurse from there.
If the recursion happens with the perl example,
it doesn't matter in my case since there is nothing there.
I'd still like to know if
%perl -pie 's/old/new/g' ./*/* does what I want.
Meditation: This whole thing has taken a direction
that I am bemused by. I thought I was asking a simple and
straightforward question. The discussion has ranged far
and wide. And I find myself in the position of 'arguing'
with answers that seem not to answer the question I asked
but rather go in different directions. If I am seeming
ungrateful, ungracious, or argumentative, I apologize.
I really am just trying to get clarity on my measily
half-line solution.
If my solution does not do what I want, just say that and
explain where I have gone astray. And if my solution fails,
I would be very happy to see a pure-perl command-line
solution if that is possible.
Thanks to all for your (presumed) patience.
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.