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

A handy one-liner for filtering planetsun.org content

Expand Messages
  • Eric Boutilier
    ... Date: Thu, 30 Sep 2004 08:59:35 +0200 From: Juan J. Martinez To: eric_boutilier at yahoo dot com Subject: About 3 minutes $ lynx -source
    Message 1 of 10 , Oct 1, 2004
    View Source
    • 0 Attachment
      On my blog (blogs.sun.com/eric_boutilier) the other day I wrote:
      > *Screening for Solaris topics*
      >
      > I want to periodically filter and summarize all the current entries on
      > planetsun.org that contain solaris in the subject. My quick hack is
      > copied below (showing my age, eh?). Does anybody know of a simple way to
      > do something like this where the output will include hrefs instead of
      > just plain text? The only rule is, you're not allowed to spend more time
      > on it than I did coming up with this... I.e. about 5 minutes. :-)
      >
      > * Source code: *
      >
      > $ lynx -nolist -dump http://planetsun.org/abbrev.html | grep -i -A4 ' --
      > .*solaris' | sed 's/\[T.*$//' | grep -v '^$'
      >
      > *Screenshot:*
      >
      > Henry Jia Hongyu -- 'Open Source Solaris' to debut this year
      > September 28, 2004 01:04 PM UTC
      > Here is the latest news on 'Open Source Solaris'. Enjoy.
      > --
      > Glenn M. Brunette, Jr. -- Solaris 10 Password History
      > September 28, 2004 12:59 PM UTC
      > Today's topic is short and sweet: password history. For those who are
      > --
      > Alan DuBoff -- Solaris x86 users, commend yourself
      > September 27, 2004 08:18 PM UTC
      > How to Win Friends and Influence People Recentely, my manager required
      > --
      > hung-sheng tsao -- Infiniband in Solaris 10
      > September 27, 2004 12:46 PM UTC
      > Solaris 10 introduce support for Infiniband devices
      > --
      > Chris Gerhard -- Solaris automounting to the Nth....
      > September 27, 2004 09:33 AM UTC
      > My first introduction to the automounter was when it arrived as part
      > --
      > Glenn M. Brunette, Jr. -- Foundation for Minimal Solaris 10 Systems
      > September 27, 2004 07:06 AM UTC
      >

      And Juan J. Martinez replied:

      -----------------------------------------------------

      Date: Thu, 30 Sep 2004 08:59:35 +0200
      From: "Juan J. Martinez"
      To: eric_boutilier at yahoo dot com
      Subject: About 3 minutes

      $ lynx -source http://planetsun.org/abbrev.html | \
      grep -i -A5 '<div class="entry">' | \
      grep -i -A4 '^<h2>.*solaris' | lynx -stdin

      But I used yours as base :)

      Regards,

      Juanjo

      --
      Desarrollo y Sistemas: http://usebox.net/
      Pagina personal: http://usebox.net/jjm/

      -----------------------------------------------------
    • Jon LaBadie
      ... Looks like gnu grep, not solaris or xpg4. -- Jon H. LaBadie jon@jgcomp.com JG Computing 4455 Province Line Road (609) 252-0159
      Message 2 of 10 , Oct 1, 2004
      View Source
      • 0 Attachment
        On Fri, Oct 01, 2004 at 02:20:03PM -0500, Eric Boutilier wrote:
        > On my blog (blogs.sun.com/eric_boutilier) the other day I wrote:
        > > *Screening for Solaris topics*
        > >
        > > I want to periodically filter and summarize all the current entries on
        > > planetsun.org that contain solaris in the subject. My quick hack is
        > > copied below (showing my age, eh?). Does anybody know of a simple way to
        > > do something like this where the output will include hrefs instead of
        > > just plain text? The only rule is, you're not allowed to spend more time
        > > on it than I did coming up with this... I.e. about 5 minutes. :-)
        > >
        > > * Source code: *
        > >
        > > $ lynx -nolist -dump http://planetsun.org/abbrev.html | grep -i -A4 ' --
        > > .*solaris' | sed 's/\[T.*$//' | grep -v '^$'


        Looks like gnu grep, not solaris or xpg4.

        --
        Jon H. LaBadie jon@...
        JG Computing
        4455 Province Line Road (609) 252-0159
        Princeton, NJ 08540-4322 (609) 683-7220 (fax)
      • Eric Boutilier
        ... Hi Jon, Yes, good point. I have done this: $ ln -s /usr/sfw/bin/ggrep $HOME/bin/grep for all the GNU commands in /usr/sfw/bin. Eric
        Message 3 of 10 , Oct 4, 2004
        View Source
        • 0 Attachment
          On Friday, Jon LaBadie wrote:
          > On Fri, Oct 01, 2004 at 02:20:03PM -0500, Eric Boutilier wrote:
          > > On my blog (blogs.sun.com/eric_boutilier) the other day I wrote:
          > > > *Screening for Solaris topics*
          > > >
          > > > I want to periodically filter and summarize all the current entries on
          > > > planetsun.org that contain solaris in the subject. My quick hack is
          > > > copied below (showing my age, eh?). Does anybody know of a simple way to
          > > > do something like this where the output will include hrefs instead of
          > > > just plain text? The only rule is, you're not allowed to spend more time
          > > > on it than I did coming up with this... I.e. about 5 minutes. :-)
          > > >
          > > > * Source code: *
          > > >
          > > > $ lynx -nolist -dump http://planetsun.org/abbrev.html | grep -i -A4 ' --
          > > > .*solaris' | sed 's/\[T.*$//' | grep -v '^$'
          >
          >
          > Looks like gnu grep, not solaris or xpg4.

          Hi Jon,

          Yes, good point.

          I have done this:

          $ ln -s /usr/sfw/bin/ggrep $HOME/bin/grep

          for all the GNU commands in /usr/sfw/bin.

          Eric

          >
          > --
          > Jon H. LaBadie jon@...
          > JG Computing
          > 4455 Province Line Road (609) 252-0159
          > Princeton, NJ 08540-4322 (609) 683-7220 (fax)
          >
          >
          >
          > Please check the Links page before posting:
          > http://groups.yahoo.com/group/solarisx86/links
          > Post message: solarisx86@yahoogroups.com
          > UNSUBSCRIBE: solarisx86-unsubscribe@yahoogroups.com
          >
          >
          > Yahoo! Groups Links
          >
          >
          >
          >
          >
          >
        • Alan DuBoff
          ... I don t think so, it s nVidia s NIC. The odd thing about teh nForce2/3 chipset is that when a manufacturer uses that chipset, in many cases they ll add
          Message 4 of 10 , Oct 4, 2004
          View Source
          • 0 Attachment
            On Monday 04 October 2004 16:56, Keith wrote:
            > I am wondering if the NFORCE2 NIC is actually the same as the
            > realtek NIC. Do anyone know?

            I don't think so, it's nVidia's NIC. The odd thing about teh nForce2/3
            chipset is that when a manufacturer uses that chipset, in many cases they'll
            add another NIC that they prefer, like an Intel or a 3Com. In that case the
            onboard chipset is replaced with another onboard chipset.

            So, without knowing the device IDs it's hard to say for certain. Even with
            the device IDs, often the ID is not listed in the pci id database.

            --

            Alan DuBoff
            Software Orchestration
            GPG: 1024D/B7A9EBEE 5E00 57CD 5336 5E0B 288B 4126 0D49 0D99 B7A9 EBEE
          • Al Hopper
            ... I don t want to start a war here... It s probably more of a difference in style; but: Is nt it better to use different names for different utilities in
            Message 5 of 10 , Oct 4, 2004
            View Source
            • 0 Attachment
              On Mon, 4 Oct 2004, Eric Boutilier wrote:

              >
              > On Friday, Jon LaBadie wrote:
              > > On Fri, Oct 01, 2004 at 02:20:03PM -0500, Eric Boutilier wrote:
              > > > On my blog (blogs.sun.com/eric_boutilier) the other day I wrote:
              > > > > *Screening for Solaris topics*
              > > > >
              > > > > I want to periodically filter and summarize all the current entries on
              > > > > planetsun.org that contain solaris in the subject. My quick hack is
              > > > > copied below (showing my age, eh?). Does anybody know of a simple way to
              > > > > do something like this where the output will include hrefs instead of
              > > > > just plain text? The only rule is, you're not allowed to spend more time
              > > > > on it than I did coming up with this... I.e. about 5 minutes. :-)
              > > > >
              > > > > * Source code: *
              > > > >
              > > > > $ lynx -nolist -dump http://planetsun.org/abbrev.html | grep -i -A4 ' --
              > > > > .*solaris' | sed 's/\[T.*$//' | grep -v '^$'
              > >
              > >
              > > Looks like gnu grep, not solaris or xpg4.
              >
              > Hi Jon,
              >
              > Yes, good point.
              >
              > I have done this:
              >
              > $ ln -s /usr/sfw/bin/ggrep $HOME/bin/grep
              >
              > for all the GNU commands in /usr/sfw/bin.

              I don't want to start a war here... It's probably more of a difference
              in style; but: Is'nt it better to use different names for different
              utilities in scripts (even one-liners)?

              So my take on this would be to write the script with ggrep for GNU grep,
              gmake for GNU make etc. - so that anyone reading the script can "see" which
              version of a command you're actually using. And it you move the script to
              another machine, it'll fail to run if you have not made the same
              associations between the names you used in the scripts and the utilites
              present on the new machine. This is a safer failure mode, rather than
              having a script that uses the "wrong" version of grep produce no output (I
              know that this does not apply to your one-liner above).

              If you go along with me on this tact, then the question is how do you
              "move" your environment to another platform so that all your scripts etc,
              will perform as designed. One answer is to simply alias them - assuming
              you're using ksh as your shell.

              So in your ~/.profile you have:
              export ENV=~/.envfile

              and in your .envfile you have (stuff like):

              alias a=alias
              a h=history
              a l=less
              a more=less
              a pg=less
              set -o vi
              set -o trackall
              a cls=clear
              a d="ls -CaF"
              a hn=hostname
              a vim="/opt/csw/bin/vim -X"
              a ggrep=/opt/sfw/bin/ggrep

              and if you're doing something as root you:

              exec ksh -o vi
              cd ~al
              . ./.profile; . ./.envfile

              Again, if you forget to define your aliases, your scripts will fail to run,
              i.e, fail safe.

              And I know I've just broken my own suggestion with the line above that
              reads:

              a more=less

              :)

              Al Hopper Logical Approach Inc, Plano, TX. al@...
              Voice: 972.379.2133 Fax: 972.379.2134
              We can stop programming when computers understand:
              Time flies like an an arrow; fruit flies like a banana.
            • Eric Boutilier
              ... Hi Al, Actually, I agree -- using symbolic links to simplify my CLI-life is no excuse for posting a shell script here that has an annoying ambiguity like
              Message 6 of 10 , Oct 4, 2004
              View Source
              • 0 Attachment
                Today, Al Hopper wrote:
                >
                > On Mon, 4 Oct 2004, Eric Boutilier wrote:
                >
                > >
                > > On Friday, Jon LaBadie wrote:
                > > > On Fri, Oct 01, 2004 at 02:20:03PM -0500, Eric Boutilier wrote:
                > > > > On my blog (blogs.sun.com/eric_boutilier) the other day I wrote:
                > > > > > *Screening for Solaris topics*
                > > > > >
                > > > > > I want to periodically filter and summarize all the current entries on
                > > > > > planetsun.org that contain solaris in the subject. My quick hack is
                > > > > > copied below (showing my age, eh?). Does anybody know of a simple way to
                > > > > > do something like this where the output will include hrefs instead of
                > > > > > just plain text? The only rule is, you're not allowed to spend more time
                > > > > > on it than I did coming up with this... I.e. about 5 minutes. :-)
                > > > > >
                > > > > > * Source code: *
                > > > > >
                > > > > > $ lynx -nolist -dump http://planetsun.org/abbrev.html | grep -i -A4 ' --
                > > > > > .*solaris' | sed 's/\[T.*$//' | grep -v '^$'
                > > >
                > > >
                > > > Looks like gnu grep, not solaris or xpg4.
                > >
                > > Hi Jon,
                > >
                > > Yes, good point.
                > >
                > > I have done this:
                > >
                > > $ ln -s /usr/sfw/bin/ggrep $HOME/bin/grep
                > >
                > > for all the GNU commands in /usr/sfw/bin.
                >
                > I don't want to start a war here...

                Hi Al,

                Actually, I agree -- using symbolic links to simplify my CLI-life
                is no excuse for posting a shell script here that has an annoying
                ambiguity like that.

                Eric

                > It's probably more of a difference
                > in style; but: Is'nt it better to use different names for different
                > utilities in scripts (even one-liners)?
                >
                > So my take on this would be to write the script with ggrep for GNU grep,
                > gmake for GNU make etc. - so that anyone reading the script can "see" which
                > version of a command you're actually using. And it you move the script to
                > another machine, it'll fail to run if you have not made the same
                > associations between the names you used in the scripts and the utilites
                > present on the new machine. This is a safer failure mode, rather than
                > having a script that uses the "wrong" version of grep produce no output (I
                > know that this does not apply to your one-liner above).
                >
                > If you go along with me on this tact, then the question is how do you
                > "move" your environment to another platform so that all your scripts etc,
                > will perform as designed. One answer is to simply alias them - assuming
                > you're using ksh as your shell.
                >
                > So in your ~/.profile you have:
                > export ENV=~/.envfile
                >
                > and in your .envfile you have (stuff like):
                >
                > alias a=alias
                > a h=history
                > a l=less
                > a more=less
                > a pg=less
                > set -o vi
                > set -o trackall
                > a cls=clear
                > a d="ls -CaF"
                > a hn=hostname
                > a vim="/opt/csw/bin/vim -X"
                > a ggrep=/opt/sfw/bin/ggrep
                >
                > and if you're doing something as root you:
                >
                > exec ksh -o vi
                > cd ~al
                > . ./.profile; . ./.envfile
                >
                > Again, if you forget to define your aliases, your scripts will fail to run,
                > i.e, fail safe.
                >
                > And I know I've just broken my own suggestion with the line above that
                > reads:
                >
                > a more=less
                >
                > :)
                >
                > Al Hopper Logical Approach Inc, Plano, TX. al@...
                > Voice: 972.379.2133 Fax: 972.379.2134
                > We can stop programming when computers understand:
                > Time flies like an an arrow; fruit flies like a banana.
                >
                >
                >
                >
                > Please check the Links page before posting:
                > http://groups.yahoo.com/group/solarisx86/links
                > Post message: solarisx86@yahoogroups.com
                > UNSUBSCRIBE: solarisx86-unsubscribe@yahoogroups.com
                >
                >
                > Yahoo! Groups Links
                >
                >
                >
                >
                >
                >
                >
                >
              • Keith
                Hi: I have partial success in installing Solaris 10 on my HP Pavilion a520n. The computer has a ASUS motherboard with 2.2GHz AMD Athlon (3200+), 1GB, 2 disks
                Message 7 of 10 , Oct 4, 2004
                View Source
                • 0 Attachment
                  Hi:
                  I have partial success in installing Solaris 10 on my HP Pavilion
                  a520n. The computer has a ASUS motherboard with 2.2GHz AMD Athlon
                  (3200+), 1GB, 2 disks (160GB and 200GB), embedded NForce2 NIC, and
                  embedded NVidia GeForce Graphic Chip.
                  To be able to install Solaris 10 on the second disk, I actually have
                  to install Solaris 9 and do an upgrade instead. Installing on a single
                  40GB disk (took out the 2 disks and using my old disk) worked, but not
                  on the 2 disks configuration. Also, the embedded NIC is not working as
                  well. I had to plug in a 3COM NIC instead.
                  I am quite a happy camper that I could install Solaris 10 on this
                  computer. The only things that are not working are the audio and the NIC.
                  I am wondering if the NFORCE2 NIC is actually the same as the
                  realtek NIC. Do anyone know?

                  Thanks,
                  Keith
                • John D Groenveld
                  ... You would need a Nvidia NForce2 driver. I don t know of one for Solaris. The Realtek device is the PHY chip.
                  Message 8 of 10 , Oct 4, 2004
                  View Source
                  • 0 Attachment
                    In message <4161E329.1060504@...>, Keith writes:
                    > I am wondering if the NFORCE2 NIC is actually the same as the
                    >realtek NIC. Do anyone know?

                    You would need a Nvidia NForce2 driver. I don't know of one for Solaris.

                    The Realtek device is the PHY chip.
                    <URL:http://www.realtek.com.tw/downloads/phyDesc.aspx>

                    John
                    groenveld@...
                  • Jon LaBadie
                    ... Eric s pipeline would certainly have to be put into a script for general use. Though it is one command, it is complex and about 100 characters long. I
                    Message 9 of 10 , Oct 4, 2004
                    View Source
                    • 0 Attachment
                      On Mon, Oct 04, 2004 at 02:59:48PM -0500, Al Hopper wrote:
                      >
                      > On Mon, 4 Oct 2004, Eric Boutilier wrote:
                      >
                      > > Yes, good point.
                      > >
                      > > I have done this:
                      > >
                      > > $ ln -s /usr/sfw/bin/ggrep $HOME/bin/grep
                      > >
                      > > for all the GNU commands in /usr/sfw/bin.
                      >
                      > I don't want to start a war here... It's probably more of a difference
                      > in style; but: Is'nt it better to use different names for different
                      > utilities in scripts (even one-liners)?
                      >
                      > So my take on this would be to write the script with ggrep for GNU grep,
                      > gmake for GNU make etc. - so that anyone reading the script can "see" which
                      > version of a command you're actually using. And it you move the script to
                      > another machine, it'll fail to run if you have not made the same
                      > associations between the names you used in the scripts and the utilites
                      > present on the new machine. This is a safer failure mode, rather than
                      > having a script that uses the "wrong" version of grep produce no output (I
                      > know that this does not apply to your one-liner above).
                      >
                      > If you go along with me on this tact, then the question is how do you
                      > "move" your environment to another platform so that all your scripts etc,
                      > will perform as designed. One answer is to simply alias them - assuming
                      > you're using ksh as your shell.
                      >
                      > So in your ~/.profile you have:
                      > export ENV=~/.envfile
                      >
                      > and in your .envfile you have (stuff like):
                      >
                      > alias a=alias
                      ...
                      > a ggrep=/opt/sfw/bin/ggrep
                      >
                      ...
                      >
                      > Again, if you forget to define your aliases, your scripts will fail to run,
                      > i.e, fail safe.

                      Eric's pipeline would certainly have to be put into a script for general use.
                      Though it is one command, it is complex and about 100 characters long.

                      I don't think your suggestion would work though as ksh aliases defined
                      in $ENV are not available in scripts, only interactive sessions.

                      --
                      Jon H. LaBadie jon@...
                      JG Computing
                      4455 Province Line Road (609) 252-0159
                      Princeton, NJ 08540-4322 (609) 683-7220 (fax)
                    • Al Hopper
                      On Mon, 4 Oct 2004, Jon LaBadie wrote: ... #!/usr/bin/ksh . ~/.profile; . ~/.envfile or something similar. Al Hopper Logical Approach Inc, Plano, TX.
                      Message 10 of 10 , Oct 5, 2004
                      View Source
                      • 0 Attachment
                        On Mon, 4 Oct 2004, Jon LaBadie wrote:

                        ... snip ....
                        > I don't think your suggestion would work though as ksh aliases defined
                        > in $ENV are not available in scripts, only interactive sessions.

                        #!/usr/bin/ksh

                        . ~/.profile; . ~/.envfile

                        or something similar.

                        Al Hopper Logical Approach Inc, Plano, TX. al@...
                        Voice: 972.379.2133 Fax: 972.379.2134
                        We can stop programming when computers understand:
                        Time flies like an an arrow; fruit flies like a banana.
                      Your message has been successfully submitted and would be delivered to recipients shortly.