Re: Scripting question, [small programming question

From: Matthew Miller (mattdm_at_mattdm.org)
Date: 05/25/05

  • Next message: Rahul Sundaram: "Re: Scripting question, [small programming question"
    Date: Wed, 25 May 2005 09:33:31 -0400
    To: For users of Fedora Core releases <fedora-list@redhat.com>
    
    

    On Wed, May 25, 2005 at 08:11:14AM -0500, Les Mikesell wrote:
    > However, back when these concepts were being developed, it was pretty
    > easy to read *all* the unix man pages and understand which tool should
    > be used for which job. Before X was included, the entire manual set for
    > a unix system fit in 3 fairly small books. Now, with all the X programs
    > and development tools included, finding the old simple utilities would
    > be a much harder job even though they still work as well as ever.

    One suggestion is to do "rpm -ql coreutils" and skim through the man page of
    each of those utilies.

    Then, for slightly more advanced (and often linux-specific) utilities, look
    at "rpm -ql util-linux".

    This won't cover everything (notably important stand-alone programs like awk
    and sed), but would give a pretty good base.

    > Before you start something really complicated in a shell script, though,
    > you should think through whether it would be better in a more
    > comprehensive language like perl. In shell, you have extra overhead
    > of starting other programs for each operation. This is done very
    > efficiently but still is extra work compared to built-in operations, and
    > there are some operations like working with sockets that are included
    > in perl but not sh.

    I think a good rule of thumb is that if your shell script doesn't fit on a
    single 80x25 screen, it's maybe time to consder a more powerful scripting
    language.

    -- 
    Matthew Miller           mattdm@mattdm.org        <http://www.mattdm.org/>
    Boston University Linux      ------>                <http://linux.bu.edu/>
    Current office temperature: 73 degrees Fahrenheit.
    -- 
    fedora-list mailing list
    fedora-list@redhat.com
    To unsubscribe: http://www.redhat.com/mailman/listinfo/fedora-list
    

  • Next message: Rahul Sundaram: "Re: Scripting question, [small programming question"

    Relevant Pages

    • Re: file rename help
      ... Why, BTW? ... a shell script is a shell script and a Perl program is... ... what if $cfile was empty and hence moved to "$cfile.zero.txt"?!? ...
      (comp.lang.perl.misc)
    • [OT] Re: simple question on C++
      ... Jerry Stuart wrote: ... >> have something like this working today, I'd probably use Perl. ... I am familiar with Linux and would ... Well, on a typical Solaris system a shell script would do, and no reboot ...
      (alt.comp.lang.learn.c-cpp)
    • NEWBIE: Perls System -command and Cygwin bash-shell
      ... I am having problem in W2K when using Cygwin's Perl. ... My Perl script starts Shell script with System -command; ... cat "blah blah"> tempfile ... normal Bash shell command: "rm tempfile". ...
      (comp.lang.perl.misc)
    • RE: Run Shell Script Using Perl
      ... Run Shell Script Using Perl ... You need to rewrite a shell script that does file transfer in Perl? ... would work -- ftp, scp, rsync, cp over NFS mount (or SMB mount, or DAV ...
      (perl.beginners)
    • Re: rpm - failed dependencies - "Perl >= 5.6 needed"
      ... > main purpose of my computer was to serve a slashcode-based website. ... > install slashcode, you basically have to install Perl from source. ... > tell rpm that, yes, I do have Perl installed! ...
      (alt.os.linux)