Loading ...
Sorry, an error occurred while loading the content.

Re: [LINUX_Newbies] Script Help Required, please.

Expand Messages
  • Brad Rogers
    On Tue, 30 Nov 2004 22:24:23 +0000 ed wrote: Hello ed, ... Well, I wouldn t go that far..... :-) On the whole though, yes, I have to
    Message 1 of 10 , Nov 30, 2004
    • 0 Attachment
      On Tue, 30 Nov 2004 22:24:23 +0000
      ed <ed@...> wrote:

      Hello ed,

      > Learn bash and it will become the highlight of your days.

      Well, I wouldn't go that far..... :-)

      On the whole though, yes, I have to agree that learning bash is a "good
      thing" {tm}.

      --
      Regards _
      / ) "The blindingly obvious is
      / _)rad never immediately apparent"


      [Non-text portions of this message have been removed]
    • ed
      ... Hash: SHA1 On Tue, 30 Nov 2004 23:56:22 +0000 ... You have not experienced the deep joy(tm) of dropping some kung-foo script into a working system and see
      Message 2 of 10 , Dec 1, 2004
      • 0 Attachment
        -----BEGIN PGP SIGNED MESSAGE-----
        Hash: SHA1

        On Tue, 30 Nov 2004 23:56:22 +0000
        Brad Rogers <brad@...> wrote:

        > > Learn bash and it will become the highlight of your days.
        >
        > Well, I wouldn't go that far..... :-)

        You have not experienced the deep joy(tm) of dropping some kung-foo
        script into a working system and see it spawn off a dozen carefully
        selected tasks, auto-magically.

        Seriously. I took over a system and have done many things that would
        take lazy programmers forever to accomplish. I think sh should be taught
        as a basic programming language in colleges instead of pascal. We'd all
        be better admins for it (and it ingrains some Linux into students, but
        they have no excuse not to use Linux for their C courses).

        I think half the power of bash is in utils like grep sed and tr. They're
        VERY powerful and well worth learning:

        MP3PLAYER="My favourite mp3 player is WINAMP"
        echo `echo $MP3PLAYER | sed 's/WINAMP/XMMS/'`

        The above does not qualify for deep joy (tm) but I'm sure you get the
        idea.

        - --
        /-- _| | Regards. Please note, my PGP key ID has changed.
        |-- / | | If you are planning on sending me something encrypted
        \__ \_| | please update your keyring. Debian/OpenBSD. 53C9FC6C.
        -----BEGIN PGP SIGNATURE-----
        Version: GnuPG v1.2.4 (GNU/Linux)

        iD8DBQFBrihwjtZArFPJ/GwRApJAAJ9OoMi0sc1zqjedVv+lW76dTFKanwCeL6bK
        exVeFRMyzDNVyZutLQ43tEA=
        =i9qy
        -----END PGP SIGNATURE-----
      • Michael Kjorling
        ... What s wrong with this...? echo $MP3PLAYER | sed s/WINAMP/XMMS/ Avoids a second spawn plus the overhead of using backticks. The pipe is bad enough. --
        Message 3 of 10 , Dec 1, 2004
        • 0 Attachment
          On 2004-12-01 20:24 +0000, ed@... wrote:
          > echo `echo $MP3PLAYER | sed 's/WINAMP/XMMS/'`

          What's wrong with this...?

          echo $MP3PLAYER | sed 's/WINAMP/XMMS/'

          Avoids a second spawn plus the overhead of using backticks. The pipe
          is bad enough.

          --
          Michael Kjörling, michael@... - http://michael.kjorling.com/
          OpenPGP Fingerprint: 3723 9372 c245 d6a8 18a6 36ac 758F8749 BDE9ADA6
          * ASCII Ribbon Campaign: Against HTML Mail, Proprietary Attachments *
          * No bird soars too high if he soars with his own wings. -*- SM0YBY *
        • ed
          ... Hash: SHA1 On Wed, 1 Dec 2004 21:28:17 +0100 ... Nothing is wrong, in fact it s very right. I must have taken too much deep joy while writing that too
          Message 4 of 10 , Dec 1, 2004
          • 0 Attachment
            -----BEGIN PGP SIGNED MESSAGE-----
            Hash: SHA1

            On Wed, 1 Dec 2004 21:28:17 +0100
            Michael Kjorling <michael@...> wrote:

            > > echo `echo $MP3PLAYER | sed 's/WINAMP/XMMS/'`
            >
            > What's wrong with this...?
            >
            > echo $MP3PLAYER | sed 's/WINAMP/XMMS/'
            >
            > Avoids a second spawn plus the overhead of using backticks. The pipe
            > is bad enough.

            Nothing is wrong, in fact it's very right. I must have taken too much
            deep joy while writing that too notice.

            - --
            /-- _| | Regards. Please note, my PGP key ID has changed.
            |-- / | | If you are planning on sending me something encrypted
            \__ \_| | please update your keyring. Debian/OpenBSD. 53C9FC6C.
            -----BEGIN PGP SIGNATURE-----
            Version: GnuPG v1.2.4 (GNU/Linux)

            iD8DBQFBri4/jtZArFPJ/GwRAuQCAJwNnacs1OlfcgiaUcwQbl3Vjj285wCeN7VG
            EBAXw671OSCiAodgNLAAAe8=
            =PFNr
            -----END PGP SIGNATURE-----
          • Brad Rogers
            On Wed, 1 Dec 2004 20:24:16 +0000 ed wrote: Hello ed, ... True, but I can appreciate a good job well done, so I take your meaning. ... I
            Message 5 of 10 , Dec 2, 2004
            • 0 Attachment
              On Wed, 1 Dec 2004 20:24:16 +0000
              ed <ed@...> wrote:

              Hello ed,

              > > > Learn bash and it will become the highlight of your days.
              > > Well, I wouldn't go that far..... :-)
              > You have not experienced the deep joy(tm) of dropping some kung-foo
              > script into a working system and see it spawn off a dozen carefully
              > selected tasks, auto-magically.

              True, but I can appreciate a good job well done, so I take your meaning.

              > I think half the power of bash is in utils like grep sed and tr.
              > They're VERY powerful and well worth learning:

              I can see that they are, yes. Sadly, most of the info I have about them
              leaves a lot to be desired. One day, a Google session is in order, I
              feel.

              > MP3PLAYER="My favourite mp3 player is WINAMP"
              > echo `echo $MP3PLAYER | sed 's/WINAMP/XMMS/'`
              > The above does not qualify for deep joy (tm) but I'm sure you get the
              > idea.

              Indeed, I do.

              --
              Regards _
              / ) "The blindingly obvious is
              / _)rad never immediately apparent"


              [Non-text portions of this message have been removed]
            Your message has been successfully submitted and would be delivered to recipients shortly.