euglug.org

[카테고리:] Uncategorized

  • [Eug-lug] ANNOUNCEMENT: January PLUG Meeting



    Michael MillerTue Jan 2 08:53:09 PST 2007

    Any one interested in car pooling up to Portland for this meet?
    
    -Miller
    
    On 1/1/07, David Mandel <dmandel at pdxlinux.org> wrote:
    >                              MEETING ANNOUNCEMENT
    >
    >                         The Portland Linux/Unix Group
    >                                   will meet
    >                           7 PM Thursday Jan 4, 2007
    >                                       at
    >                           Portland State University
    >                                       in
    >                             Smith Memorial Center
    >                                    Room 294
    >                            On the block bounded by
    >        SW Montgomery, SW Broadway (7th), SW Harrison, and SW Park (9th)
    >
    >       *******************************************************************
    >
    >                                  PRESENTATION
    >
    >                                       by
    >
    >                               Randal L. Schwartz
    >                            <merlyn at stonehenge.com>
    >
    >
    >       As most of you know Randal is "the primary person to blame
    >       for Stonehenge Consulting Services, Inc."  He is author of
    >       many of the principal books and articles on Perl programming,
    >       and gives many workshops including workshops with Geek Cruises.
    >       Randal is also an expert on computer crime both as a consultant
    >       to law enforcement agencies and as a defendant who became
    >       a felon for doing his job with a bit too much enthusiasm.
    >
    >       I'm waiting for Randal to verify the topic of his talk, but
    >       I believe he intends to talk about his experiences with
    >       computer crime and the legal system and what you need to do
    >       to avoid having similar problems.
    >
    >       *******************************************************************
    >
    >           Agenda:
    >
    >               7:00 - 7:30  Business
    >                    We will discuss the status of our ongoing projects
    >                    including PLUG's monthly Advanced Topics meetings,
    >                    PLUG's monthly hands on clinics, PLUG for Education,
    >                    etc.
    >
    >               7:30 - 8:30  Presentation
    >
    >                    See above
    >
    >               9:00 - ...  Beer
    >                                   The Lucky Labrador Brewing Company
    >                                   915 SE Hawthorne
    >
    >
    >
    >                                           David Mandel
    >                                           Chief Activist
    >                                           Portland Linux/Unix Group
    >                                           560 SE Alexander
    >                                           Corvallis, Oregon 97333
    >                                           (541) 730-5285 mobile
    >                                           dmandel at pdxLinux.org
    >
    >
    >           P.S.  Biznix which specializes in Linux and UNIX support for
    >                 the Business Computer User.
    >                 As I understand, they haven't been meeting for a while,
    >                 but intend to have regular meetings again in 2006.
    >                 See http://www.Biznix.org for details.
    >
    >           P.S.  BLUEgroup (The Beaverton Linux Users Education Group)
    >                 To the best of my knowledge, BLUEgroup no longer meets.
    >                 See www.BLUEgroup.org for details.
    >
    >           P.S.  PDXLUG provides a less formal alternative to PLUG
    >                 emphasizing the needs of new users.   PDXLUG meets
    >                 every second Thursday of the month in southeast Portland.
    >                 See http://www.PDXLUG.org for details.
    >
    >           P.S.  The Mid Willamette Valley Linux Users Group meets
    >                 at 6:30 PM on the first Tuesday of the month.
    >                 They have out grown their meeting location at PEAK
    >                 and are now meeting on the OSU campus.
    >                 See http://www.lug.corvallis.or.us/ for details.
    >
    >           P.S.  The Eugene Linux Users Group meets several times a month.
    >                 See http://www.euglug.org for details.
    >
    > ======================================================================
    > David Mandel                        http://www.DavidMandel.com
    > Portland Linux/Unix Group           http://pdxLinux.org
    > LinuxFund                           http://LinuxFund.org
    > ======================================================================
    > _______________________________________________
    > EUGLUG mailing list
    > euglug at euglug.org
    > http://www.euglug.org/mailman/listinfo/euglug
    >
    
  • [Eug-lug] Interesting Craigslist job post…



    Rob HudsonMon Jan 1 20:36:18 PST 2007

    http://eugene.craigslist.org/sof/255887755.html
    
    Gentoo, Postgresql, Sql-Ledger, etc.  Result of work is open sourced.
    
    -Rob
    
  • [Eug-lug] ANNOUNCEMENT: January PLUG Meeting



    David MandelMon Jan 1 13:28:44 PST 2007

                                 MEETING ANNOUNCEMENT
    
                            The Portland Linux/Unix Group
                                      will meet
                              7 PM Thursday Jan 4, 2007
                                          at
                              Portland State University
                                          in
                                Smith Memorial Center
                                       Room 294
                               On the block bounded by
           SW Montgomery, SW Broadway (7th), SW Harrison, and SW Park (9th)
    
          *******************************************************************
    
                                     PRESENTATION
    
                                          by
    
                                  Randal L. Schwartz
                               <merlyn at stonehenge.com>
    
    
          As most of you know Randal is "the primary person to blame
          for Stonehenge Consulting Services, Inc."  He is author of
          many of the principal books and articles on Perl programming,
          and gives many workshops including workshops with Geek Cruises.
          Randal is also an expert on computer crime both as a consultant
          to law enforcement agencies and as a defendant who became
          a felon for doing his job with a bit too much enthusiasm.
    
          I'm waiting for Randal to verify the topic of his talk, but
          I believe he intends to talk about his experiences with
          computer crime and the legal system and what you need to do
          to avoid having similar problems.
    
          *******************************************************************
    
              Agenda:
    
                  7:00 - 7:30  Business
                       We will discuss the status of our ongoing projects
                       including PLUG's monthly Advanced Topics meetings,
                       PLUG's monthly hands on clinics, PLUG for Education,
                       etc.
    
                  7:30 - 8:30  Presentation
    
                       See above
    
                  9:00 - ...  Beer
                                      The Lucky Labrador Brewing Company
                                      915 SE Hawthorne
    
    
    
                                              David Mandel
                                              Chief Activist
                                              Portland Linux/Unix Group
                                              560 SE Alexander
                                              Corvallis, Oregon 97333
                                              (541) 730-5285 mobile
                                              dmandel at pdxLinux.org
    
    
              P.S.  Biznix which specializes in Linux and UNIX support for
                    the Business Computer User.
                    As I understand, they haven't been meeting for a while,
                    but intend to have regular meetings again in 2006.
                    See http://www.Biznix.org for details.
    
              P.S.  BLUEgroup (The Beaverton Linux Users Education Group)
                    To the best of my knowledge, BLUEgroup no longer meets.
                    See www.BLUEgroup.org for details.
    
              P.S.  PDXLUG provides a less formal alternative to PLUG
                    emphasizing the needs of new users.   PDXLUG meets
                    every second Thursday of the month in southeast Portland.
                    See http://www.PDXLUG.org for details.
    
              P.S.  The Mid Willamette Valley Linux Users Group meets
                    at 6:30 PM on the first Tuesday of the month.
                    They have out grown their meeting location at PEAK
                    and are now meeting on the OSU campus.
                    See http://www.lug.corvallis.or.us/ for details.
    
              P.S.  The Eugene Linux Users Group meets several times a month.
                    See http://www.euglug.org for details.
    
    ======================================================================
    David Mandel                        http://www.DavidMandel.com
    Portland Linux/Unix Group           http://pdxLinux.org
    LinuxFund                           http://LinuxFund.org
    ======================================================================
    
  • [Eug-lug] Strange shell behavior



    Martin KellyMon Jan 1 12:01:54 PST 2007

    Yes, the example below would've worked... I think my problem was missing 
    double quotes screwing up the parsing of spaces. I actually don't have a 
    reason not to do it the simple way, however; it's just that I don't know 
    much about grep/bash. I think I'm going to use grep -lr, as it is giving 
    the output I wanted.
    
    Thanks,
    Martin
    
    Bob Miller wrote:
    > Martin Kelly wrote:
    > 
    >> I have just written a shell script that greps a directory for a certain 
    >> pattern and reports each file that contains the pattern along with the 
    >> filename before it (this is why I wrote it... if I just do a "ls | cat | 
    >> grep pattern" or something like that it will report the text that 
    >> matches but not the filename).
    >>
    >> I am getting strange behavior in that it works, but sometimes it 
    >> randomly reports the contents of my / directory. This does not always 
    >> happen, only sometimes.
    > 
    > Have you already considered and rejected doing it the simple way?
    > 
    >   $ cat misc/dirgrep
    >   #!/bin/sh
    >   cd "$1"
    >   shift
    >   grep "$@" *
    >   $ misc/dirgrep code/c/kr/1/ MAXLINE
    >   1-16.c:#define MAXLINE 1000 /* maximum input line size */
    >   1-16.c:char  line[MAXLINE]; /* current input line */
    >   1-16.c:char longest[MAXLINE]; /* longest line  saved here */
    >   1-16.c:while ((len = getline(line, MAXLINE)) > 0)
    >   1-17.c:#define MAXLINE 1000 char line[MAXLINE]; while ((len = getline(line, MAXLINE)) > 0) {
    > 
    > Also note that "grep -r ..." will recursively search subdirectories.
    > That's useful sometimes.  You could just say
    > 
    >   $ grep -r MAXLINE code/c/kr/1/
    > 
    > If you have reason not to do it that way, you can fix your script by
    > not using backslashes (it runs the output lines together) and by
    > quoting $TEXT in the echo command.
    > 
    > You don't need to save and restore the current directory.  Each
    > shell script runs in its own process, and each processs has its
    > own current directory.  So when the script exits, the kernel
    > forgets its current directory.
    > 
    > This would work.
    > 
    >   #!/bin/bash
    >   cd "$1"			# note quotes
    >   for file in *
    >   do
    >     if grep -q "$2" "$file"	# note quotes
    >     then
    >       echo
    >       echo "$file:"
    >       echo "-----------------------"
    >       grep "$2" "$file"
    >     fi
    >   done
    > 
    
  • [Eug-lug] Strange shell behavior



    Bob MillerMon Jan 1 01:59:20 PST 2007

    Martin Kelly wrote:
    
    > I have just written a shell script that greps a directory for a certain 
    > pattern and reports each file that contains the pattern along with the 
    > filename before it (this is why I wrote it... if I just do a "ls | cat | 
    > grep pattern" or something like that it will report the text that 
    > matches but not the filename).
    > 
    > I am getting strange behavior in that it works, but sometimes it 
    > randomly reports the contents of my / directory. This does not always 
    > happen, only sometimes.
    
    Have you already considered and rejected doing it the simple way?
    
      $ cat misc/dirgrep
      #!/bin/sh
      cd "$1"
      shift
      grep "$@" *
      $ misc/dirgrep code/c/kr/1/ MAXLINE
      1-16.c:#define MAXLINE 1000 /* maximum input line size */
      1-16.c:char  line[MAXLINE]; /* current input line */
      1-16.c:char longest[MAXLINE]; /* longest line  saved here */
      1-16.c:while ((len = getline(line, MAXLINE)) > 0)
      1-17.c:#define MAXLINE 1000 char line[MAXLINE]; while ((len = getline(line, MAXLINE)) > 0) {
    
    Also note that "grep -r ..." will recursively search subdirectories.
    That's useful sometimes.  You could just say
    
      $ grep -r MAXLINE code/c/kr/1/
    
    If you have reason not to do it that way, you can fix your script by
    not using backslashes (it runs the output lines together) and by
    quoting $TEXT in the echo command.
    
    You don't need to save and restore the current directory.  Each
    shell script runs in its own process, and each processs has its
    own current directory.  So when the script exits, the kernel
    forgets its current directory.
    
    This would work.
    
      #!/bin/bash
      cd "$1"			# note quotes
      for file in *
      do
        if grep -q "$2" "$file"	# note quotes
        then
          echo
          echo "$file:"
          echo "-----------------------"
          grep "$2" "$file"
        fi
      done
    
    -- 
    Bob Miller                              K<bob>
                                            kbob at jogger-egg.com
    
  • [Eug-lug] New formal meet-up place



    Neil ParkerSun Dec 31 22:07:03 PST 2006

    ERock23175 at aol.com wrote,
    >I wouldn't have suggested it if I thought there was going to be a problem.  
    >about the biggest issue I can conceive of is lighting, but of course something  
    >can be done about that as well. I think if anything, we'll end up gaining a 
    >few  members, (lots of computer using students live there) and have a nice cozy 
    >place  to meet. 
    
    I can think of a couple of other issues that might affect the decision:
    
    * "The Spot" is right next to the university, which means parking is
      just about guaranteed to be difficult.  The parking spaces may look empty
      today, but they'll fill up fast when the students come back for winter
      term.
    * It's a student housing building in a neighborhood full of fraternity and
      sorority houses (in fact, it used to be a frat house), so it will probably
      be noisy.
    
                   - Neil Parker
    
  • [Eug-lug] New formal meet-up place



    ERock23175 at aol.comSun Dec 31 15:18:19 PST 2006

    I wouldn't have suggested it if I thought there was going to be a problem.  
    about the biggest issue I can conceive of is lighting, but of course something  
    can be done about that as well. I think if anything, we'll end up gaining a 
    few  members, (lots of computer using students live there) and have a nice cozy 
    place  to meet. 
     
    -E 
    -------------- next part --------------
    An HTML attachment was scrubbed...
    URL: http://euglug.org/pipermail/euglug/attachments/20061231/dda71657/attachment-0001.htm
    
  • [Eug-lug] Strange shell behavior



    Ben BarrettSun Dec 31 15:09:26 PST 2006

    Ah, yes, "find" has the "-X" option for xargs compatibility, although that
    should not be needed if you're using the "-exec" option as Horst suggests.
    That was the tip I thought was buried too deeply in my stack :)
    
    Alternately, try "grep -n MAXLINE code/c/kr/1/*" for instance?
    
        Ben
    
    
    On 12/31/06, horst <horsu at freeshell.org> wrote:
    >
    > Have you considered the use of 'find' , e.g.:
    >   find . -type f -name 'your*here' -exec grep 'string options pattern ...'
    > /dev/null {} \;
    >
    >   a) /dev/null is there to make grep list the filename (because your term
    > is found in {}, not in /dev/null
    >   b) -type f  excluded directories, symlinks, sockets, ...
    >      (grep on directories may 'report' binary stuff which can confuse your
    > terminal or other 'things' downstream)
    >   c) if your serach terms are simple text 'fgrep' may be better, not just
    > because it's faster -- it saves you a lot of \escaping.
    >   d) find let's you define you much other handy stuff, ctime, atime,
    > inode,...
    >
    > I didn't look too closely at your script, but it seemed like you'r not
    > testing file type.
    >
    > Sorry for the quick&sloppy response.
    >
    > Happy New Year to all........................Horst
    >
    >
    > > Date: Sun, 31 Dec 2006 13:33:03 -0800
    > > From: Martin Kelly <aomighty at gmail.com>
    > > Reply-To: Eugene Unix and Gnu/Linux User Group <euglug at euglug.org>
    > > To: Eugene GNU/Linux Users Group <euglug at euglug.org>
    > > Subject: [Eug-lug] Strange shell behavior
    > >
    > > I have just written a shell script that greps a directory for a certain
    > > pattern and reports each file that contains the pattern along with the
    > > filename before it (this is why I wrote it... if I just do a "ls | cat |
    > grep
    > > pattern" or something like that it will report the text that matches but
    > not
    > > the filename).
    > >
    > > I am getting strange behavior in that it works, but sometimes it
    > randomly
    > > reports the contents of my / directory. This does not always happen,
    > only
    > > sometimes.
    > >
    > > Here's an example:
    > > martin at home:~$ misc/dirgrep code/c/kr/1/ MAXLINE
    > >
    > > 1-16.c:
    > >
    > -------------------------------------------------------------------------=
    -------
    > > #define MAXLINE 1000 /backups /bin /boot /dev /etc /home /initrd
    > /initrd.img
    >   ...etc...
    > >
    > _______________________________________________
    > EUGLUG mailing list
    > euglug at euglug.org
    > http://www.euglug.org/mailman/listinfo/euglug
    >
    -------------- next part --------------
    An HTML attachment was scrubbed...
    URL: http://euglug.org/pipermail/euglug/attachments/20061231/adab8df1/attac=
    hment.htm
    
  • [Eug-lug] Strange shell behavior



    horstSun Dec 31 15:01:08 PST 2006

    Have you considered the use of 'find' , e.g.:
      find . -type f -name 'your*here' -exec grep 'string options pattern ...' /dev/null {} \;
    
      a) /dev/null is there to make grep list the filename (because your term is found in {}, not in /dev/null
      b) -type f  excluded directories, symlinks, sockets, ...
         (grep on directories may 'report' binary stuff which can confuse your terminal or other 'things' downstream)
      c) if your serach terms are simple text 'fgrep' may be better, not just because it's faster -- it saves you a lot of \escaping.
      d) find let's you define you much other handy stuff, ctime, atime, inode,...
    
    I didn't look too closely at your script, but it seemed like you'r not 
    testing file type.
    
    Sorry for the quick&sloppy response.
    
    Happy New Year to all........................Horst
    
    
    > Date: Sun, 31 Dec 2006 13:33:03 -0800
    > From: Martin Kelly <aomighty at gmail.com>
    > Reply-To: Eugene Unix and Gnu/Linux User Group <euglug at euglug.org>
    > To: Eugene GNU/Linux Users Group <euglug at euglug.org>
    > Subject: [Eug-lug] Strange shell behavior
    > 
    > I have just written a shell script that greps a directory for a certain 
    > pattern and reports each file that contains the pattern along with the 
    > filename before it (this is why I wrote it... if I just do a "ls | cat | grep 
    > pattern" or something like that it will report the text that matches but not 
    > the filename).
    >
    > I am getting strange behavior in that it works, but sometimes it randomly 
    > reports the contents of my / directory. This does not always happen, only 
    > sometimes.
    >
    > Here's an example:
    > martin at home:~$ misc/dirgrep code/c/kr/1/ MAXLINE
    >
    > 1-16.c:
    > --------------------------------------------------------------------------------
    > #define MAXLINE 1000 /backups /bin /boot /dev /etc /home /initrd /initrd.img
      ...etc...
    >
    
  • [Eug-lug] Strange shell behavior



    Ben BarrettSun Dec 31 14:03:33 PST 2006

    If any of the filenames (or cmdline input) have spaces, you'll need to be
    careful to handle that correctly...
    you might want to incorporate xargs, but I am forgetting a specific hint for
    this scenario
    which is tucked away too deeply, sorry.
    
        Ben
    
    
    On 12/31/06, Martin Kelly <aomighty at gmail.com> wrote:
    >
    > I have just written a shell script that greps a directory for a certain
    > pattern and reports each file that contains the pattern along with the
    > filename before it (this is why I wrote it... if I just do a "ls | cat |
    > grep pattern" or something like that it will report the text that
    > matches but not the filename).
    >
    > I am getting strange behavior in that it works, but sometimes it
    > randomly reports the contents of my / directory. This does not always
    > happen, only sometimes.
    >
    > Here's an example:
    > martin at home:~$ misc/dirgrep code/c/kr/1/ MAXLINE
    >
    > 1-16.c:
    >
    > -------------------------------------------------------------------------=
    -------
    > #define MAXLINE 1000 /backups /bin /boot /dev /etc /home /initrd
    > /initrd.img /lib /lost+found /media /mnt /opt /proc /root /sbin /srv
    > /sys /tmp /usr /var /vmlinuz maximum input line size */ char
    > line[MAXLINE]; /backups /bin /boot /dev /etc /home /initrd /initrd.img
    > /lib /lost+found /media /mnt /opt /proc /root /sbin /srv /sys /tmp /usr
    > /var /vmlinuz current input line */ char longest[MAXLINE]; /backups /bin
    > /boot /dev /etc /home /initrd /initrd.img /lib /lost+found /media /mnt
    > /opt /proc /root /sbin /srv /sys /tmp /usr /var /vmlinuz longest line
    > saved here */ while ((len =3D getline(line, MAXLINE)) > 0)
    >
    > 1-17.c:
    >
    > -------------------------------------------------------------------------=
    -------
    > #define MAXLINE 1000 char line[MAXLINE]; while ((len =3D getline(line,
    > MAXLINE)) > 0) {
    >
    > ...
    >
    >
    > Here's the source for dirgrep:
    >
    > #!/bin/bash
    >
    > PWD=3D`pwd`
    > cd $1
    > for file in $(ls); do
    >     TEXT=3D`cat $file | grep $2`
    >     if [ $? -eq 0 ]; then
    >        echo
    >        echo "$file:"
    >        echo
    >
    > "------------------------------------------------------------------------=
    --------"
    >        echo $TEXT
    >     fi
    > done
    >
    > cd $PWD
    >
    >
    > Thanks all,
    > Martin
    > _______________________________________________
    > EUGLUG mailing list
    > euglug at euglug.org
    > http://www.euglug.org/mailman/listinfo/euglug
    >
    -------------- next part --------------
    An HTML attachment was scrubbed...
    URL: http://euglug.org/pipermail/euglug/attachments/20061231/697ed2b4/attac=
    hment.htm