Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

Re^2: Open Files in Unix

by JavaFan (Canon)
on Oct 08, 2008 at 06:44 UTC ( #715925=note: print w/ replies, xml ) Need Help??

in reply to Re: Open Files in Unix
in thread Open Files in Unix

Rather than using an external, non-portable program...

But 'find' is quite portable. Furthermore, the OP mentioned in his title he was using Unix. 'find' has not only been ported to all Unix flavour, it's also found on (almost) any Unix system.

Comment on Re^2: Open Files in Unix
Replies are listed 'Best First'.
Re^3: Open Files in Unix
by oko1 (Deacon) on Oct 08, 2008 at 16:50 UTC

    Is it? Please try "find -iname '*foo'" or "find -regextype posix-egrep '[abc]\.html'" on, say, a Solaris system - or one with OS/X. A plain "find" (i.e., no options) would serve the OP's purpose - but it is not portable, and its use in scripts should be discouraged.

    "Language shapes the way we think, and determines what we can think about."
    -- B. L. Whorf
      You mean, as opposed to the POSIX egrep semantics of the Perl regexp engine? Oh wait.

      It's kind of silly to come up with exotic options of one implementation a find to claim it's non-portable when 1) the OP doesn't need them and 2) said exotic options aren't available in File::Find without a lot of work either.

      I just tested the script. It runs with no errors but non of the changes are made. what could be wrong?

        I personally believe that you should avoid repeating your question all over the place, especially in replies that are now part of a subthread gone slightly OT: the reason why "non of the changes are made" is the one ikegami gave you in the first place, namely that -not to mention all the various errors, and there are so many that I pointed out a lot of them myself, but also managed to miss others- you don't update the files you with the changes you made to strings you got out of those files.

        If you can't understand the incipit, then please check the IPB Campaign.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://715925]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (4)
As of 2015-11-27 09:39 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (722 votes), past polls