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.

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.

    A reply falls below the community's threshold of quality. You may see it by logging in.