Re: [OT] xkcd

2007-10-15 Thread Tom Buskey
On 10/14/07, Ben Scott [EMAIL PROTECTED] wrote:

 On 10/13/07, John Abreau [EMAIL PROTECTED] wrote:
  Of course, if you're using bash, then
http://xkcd.com/{1..327}
 
  Depends on what version of bash.

 That's why we should be using

 #!/bin/bash-3.2.9

 at the top of our shell scripts.


How about this:

#!/bin/bash

# fails if bash changes GNU bash, version  prefix
VER=$(bash --version | head -1 |cut -c19)

case $VER
  1,2)
   echo Fails
   ;;
  *)
  echo http://xkcd.com/{1..327};
  ;;
esac

If the {n...m} syntax changes in a future version of bash, you'll need to
change the case.
It'd be nice if --version wasn't so wordy or you could get just the version
like uname -r
___
gnhlug-discuss mailing list
gnhlug-discuss@mail.gnhlug.org
http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/


Re: [OT] xkcd

2007-10-15 Thread Ben Scott
On 10/15/07, Tom Buskey [EMAIL PROTECTED] wrote:
 It'd be nice if --version wasn't so wordy or you could get just the version
 like uname -r

  FYI, there is a BASH_VERSION internal variable that's useful for
this sort of thing.  There's a bunch of others with similar good info,
too.  They're not exported in the external environment (because
they're internal shell magic), so they don't show up with env.  The
bash(1) man page lists them under Shell Variables.

  Of course, knowing how much the world tends to suck, I'm guessing
BASH_VERSION is not available in all versions of Bash... ;-)

-- Ben
___
gnhlug-discuss mailing list
gnhlug-discuss@mail.gnhlug.org
http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/


Re: [OT] xkcd

2007-10-15 Thread Mark E. Mallett
On Thu, Oct 11, 2007 at 11:37:48PM -0400, Ben Scott wrote:
 On 10/11/07, Mark E. Mallett [EMAIL PROTECTED] wrote:
  mm  (I suppose we could just say xkcd.com/{`seq 1 327`})
 
   Doesn't work.  You need the comma a separator within {...}.  But even

Funny, right after I sent that (obviously should have been right before)
I tried the syntax at a prompt, and discovered it was wrong, and thought,
ah, screwed up again.  But then again I can claim it was a comment
employing metasyntax.  Yeah, that's the ticket.  :)

mm
___
gnhlug-discuss mailing list
gnhlug-discuss@mail.gnhlug.org
http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/


Re: [OT] xkcd

2007-10-15 Thread Jon 'maddog' Hall
I tried the 28 hour day

In 1973 I worked for Aetna Life and Casualty.  The company's computers
ran 24 hours a day, seven days a week.

The operators there worked 12-hour shifts, so we only had two shifts of
operators, not three.  In order to work (more or less) 40-hour weeks,
they really worked 36 hours, so there would be one team for the first
part of the week, and one team for the second part of the week.  That
left one day uncovered, so one team worked a 48-hour week (four days),
then they would switch off and the other team would work a 36-hour
week.

The company tried to make it so each team would eventually would get a
Saturday and Sunday off (a real weekend), and each team would average
out working a normal amount of hours (~40/week) when averaged out over
the year.

Ergo every two weeks the team that had been working four days would work
seven days in a row, and the opposite team would get a week's paid
vacation.  When the second team came back from vacation, they would work
3 days, the first team would go to four days, and the whole cycle
started again.  It was complex, but just like the xkcd cartoon, they had
charts that helped people plan.

While the one-week of 12 hours/day twenty-six times a year was grueling,
the seven days of no work twenty-six times a year (more or less) was
also nice.  Plus, since the jobs were basically the same, the operators
could trade off if some special event came up that they wanted to
attend.

Holidays?  You just got double timeand since you could trade off
easily, and since Aetna was an equal opportunity employer from day one,
it was easy to find someone who would work for you if you wanted the
time off.

Thanks for the memories.

md
-- 
Jon maddog Hall
Executive Director   Linux International(R)
email: [EMAIL PROTECTED] 80 Amherst St. 
Voice: +1.603.672.4557   Amherst, N.H. 03031-3032 U.S.A.
WWW: http://www.li.org

Board Member: Uniforum Association
Board Member Emeritus: USENIX Association (2000-2006)

(R)Linux is a registered trademark of Linus Torvalds in several
countries.
(R)Linux International is a registered trademark in the USA used
pursuant
   to a license from Linux Mark Institute, authorized licensor of Linus
   Torvalds, owner of the Linux trademark on a worldwide basis
(R)UNIX is a registered trademark of The Open Group in the USA and other
   countries.


___
gnhlug-discuss mailing list
gnhlug-discuss@mail.gnhlug.org
http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/


Re: [OT] xkcd

2007-10-14 Thread Ben Scott
On 10/13/07, John Abreau [EMAIL PROTECTED] wrote:
 Of course, if you're using bash, then
   http://xkcd.com/{1..327}

 Depends on what version of bash.

That's why we should be using

#!/bin/bash-3.2.9

at the top of our shell scripts.

-- Ben
___
gnhlug-discuss mailing list
gnhlug-discuss@mail.gnhlug.org
http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/


Re: [OT] xkcd

2007-10-14 Thread Ric Werme
On 10/13/07, John Abreau [EMAIL PROTECTED] wrote:
 Of course, if you're using bash, then
   http://xkcd.com/{1..327}

 Depends on what version of bash.

That's why we should be using

   #!/bin/bash-3.2.9

at the top of our shell scripts.

Unless you have Suse 10.1:

tux:~ ls -l /bin/bash*
-rwxr-xr-x 1 root root 501804 2006-06-02 10:34 /bin/bash

tux:~ bash --version
GNU bash, version 3.1.17(1)-release (i586-suse-linux)
Copyright (C) 2005 Free Software Foundation, Inc.

tux:~ echo foo{1..5}
foo1 foo2 foo3 foo4 foo5

How many versions of bash should there be in /bin?  And of everything else?


Oh yeah, xkcd. I tried the 28 hour day described in
http://www.xkcd.org/320/ a couple times, but concluded that I couldn't
shift four timezones each day.  The goal was standalone time on DEC's PDP-10s
at night and bicycling time during the day (foliage season) on weekends.

When I was getting off that, I read about a blind college student whose
internal clock was synchronized to the tides even though he was far from a
seacoast.  I tried that lunatic cycle for a month a couple years later,
going to bed at a Boston low tide.  Worked quite well, though my manager
couldn't figure out when I'd be in.  The overnight shifts were during the full
moon so it never got really dark.  I'd like to do it again, but synced with
the other low tide, and spend all night with a telescope during new moon.

   -Ric Werme
___
gnhlug-discuss mailing list
gnhlug-discuss@mail.gnhlug.org
http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/


Re: [OT] xkcd

2007-10-13 Thread John Abreau

On Thu, October 11, 2007 11:37 pm, Ben Scott said:

 Of course, if you're using bash, then

   http://xkcd.com/{1..327}

 will do the job without all the messy syntax or the external program.


Depends on what version of bash. The first time I tried that, it failed:

$ echo http://xkcd.com{1..10}
http://xkcd.com{1..10}
$ bash --version
GNU bash, version 2.05b.0(1)-release (i386-redhat-linux-gnu)
Copyright (C) 2002 Free Software Foundation, Inc.

However, on another system:

$ echo http://xkcd.com{1..10}
http://xkcd.com1 http://xkcd.com2 http://xkcd.com3 http://xkcd.com4
http://xkcd.com5 http://xkcd.com6 http://xkcd.com7 http://xkcd.com8
http://xkcd.com9 http://xkcd.com10
$ bash --version
GNU bash, version 3.2.9(1)-release (i686-redhat-linux-gnu)
Copyright (C) 2005 Free Software Foundation, Inc.



-- 
John Abreau / Executive Director, Boston Linux  Unix
IM: [EMAIL PROTECTED] / [EMAIL PROTECTED] / [EMAIL PROTECTED] / [EMAIL 
PROTECTED]
Email [EMAIL PROTECTED] / WWW http://www.abreau.net / PGP-Key-ID 0xD5C7B5D9
PGP-Key-Fingerprint 72 FB 39 4F 3C 3B D6 5B E0 C8 5A 6E F1 2C BE 99


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

___
gnhlug-discuss mailing list
gnhlug-discuss@mail.gnhlug.org
http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/


RE: [OT] xkcd

2007-10-11 Thread Flaherty, Patrick
You missed the best one.

http://xkcd.com/138/ 

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of Ben Scott
 Sent: Wednesday, October 10, 2007 9:37 PM
 To: Greater NH Linux User Group
 Subject: Re: [OT] xkcd
 
 On 10/10/07, Kent Johnson [EMAIL PROTECTED] wrote:
  If you know what a SQL injection attack is, you will love this:
  http://xkcd.com/327/
 
   For those of you who hadn't already seen the above: xkcd is 
 an extremely excellent comic, and should be read by all geeks.
 
 http://xkcd.com/149/
 
 http://xkcd.com/37/
 
 http://xkcd.com/272/
 
 http://xkcd.com/129/
 
 http://xkcd.com/293/
 
 http://xkcd.com/285/
 
 http://xkcd.com/225/
 
 http://xkcd.com/150/
 
 ...etc...
 
 -- Ben
 ___
 gnhlug-discuss mailing list
 gnhlug-discuss@mail.gnhlug.org
 http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/
 
 

___
gnhlug-discuss mailing list
gnhlug-discuss@mail.gnhlug.org
http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/


Re: [OT] xkcd

2007-10-11 Thread Ben Scott
On 10/11/07, Flaherty, Patrick [EMAIL PROTECTED] wrote:
 You missed the best one.
 http://xkcd.com/138/

  I considered adding that, but the list was already long, and listing
all the good ones would be ridiculous.  Besides, the best one is:

http://xkcd.com/240/

  Why is that the best one?  Because occasionally, wanting something
can make it real.

  (Explanation omitted to preserve the sense of wonder.  You can find
the answer if you look.)

-- Ben
___
gnhlug-discuss mailing list
gnhlug-discuss@mail.gnhlug.org
http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/


RE: [OT] xkcd

2007-10-11 Thread Flaherty, Patrick
Wow, that's unrealguy needs to start project mayhem if he just
metioned it in a comic and it happened. 

The rumblingshttp://metatalk.metafilter.com/14853/XK-Cee-you-Dere 
The result http://www.flickr.com/groups/xkcdmeetup/pool/



 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of Ben Scott
 Sent: Thursday, October 11, 2007 10:59 AM
 To: Greater NH Linux User Group
 Subject: Re: [OT] xkcd
 
 On 10/11/07, Flaherty, Patrick [EMAIL PROTECTED] wrote:
  You missed the best one.
  http://xkcd.com/138/
 
   I considered adding that, but the list was already long, 
 and listing all the good ones would be ridiculous.  Besides, 
 the best one is:
 
 http://xkcd.com/240/
 
   Why is that the best one?  Because occasionally, wanting 
 something can make it real.
 
   (Explanation omitted to preserve the sense of wonder.  You 
 can find the answer if you look.)
 
 -- Ben
 ___
 gnhlug-discuss mailing list
 gnhlug-discuss@mail.gnhlug.org
 http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/
 
 

___
gnhlug-discuss mailing list
gnhlug-discuss@mail.gnhlug.org
http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/


Re: [OT] xkcd

2007-10-11 Thread Paul Lussier
Ben Scott [EMAIL PROTECTED] writes:

   I considered adding that, but the list was already long, and listing
 all the good ones would be ridiculous.  Besides, the best one is:

 http://xkcd.com/240/

Nono.  Really, the best one is:

http://xkcd.com/224/

-- 
Seeya,
Paul
___
gnhlug-discuss mailing list
gnhlug-discuss@mail.gnhlug.org
http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/


Re: [OT] xkcd

2007-10-11 Thread Michael Costolo
On 10/11/07, Paul Lussier [EMAIL PROTECTED] wrote:


 Nono.  Really, the best one is:

 http://xkcd.com/224/


This one has to be WAY up there:

http://xkcd.com/202/
___
gnhlug-discuss mailing list
gnhlug-discuss@mail.gnhlug.org
http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/


Re: [OT] xkcd

2007-10-11 Thread Mark E. Mallett
On Thu, Oct 11, 2007 at 04:00:50PM -0400, Paul Lussier wrote:
 
 http://xkcd.com/224/

The LISP/perl ones are fun, this one especially:

http://xkcd.com/312/

with a NH connection, even (via Robert Frost).

it's probably been mentioned here before, my brain leaks like a sieve.

mm  (I suppose we could just say xkcd.com/{`seq 1 327`})
___
gnhlug-discuss mailing list
gnhlug-discuss@mail.gnhlug.org
http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/


Re: [OT] xkcd

2007-10-11 Thread Ben Scott
On 10/11/07, Mark E. Mallett [EMAIL PROTECTED] wrote:
 mm  (I suppose we could just say xkcd.com/{`seq 1 327`})

  Doesn't work.  You need the comma a separator within {...}.  But even

http://xkcd.com{`seq -s, 1 327`}

doesn't work, because the output of Command Substitution is not
reevaluated for more shell syntax.  You instead would need to generate
the supposed command line, and then use the eval builtin to have the
shell evaluate it again:

eval http://xkcd.com/\{$(seq -s, 1 327)\}

Of course, if you're using bash, then

http://xkcd.com/{1..327}

will do the job without all the messy syntax or the external program.

  How about that.  This thread is on-topic after all.  ;-)

-- Ben
___
gnhlug-discuss mailing list
gnhlug-discuss@mail.gnhlug.org
http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/


Re: [OT] xkcd

2007-10-11 Thread Paul Lussier
Ben Scott [EMAIL PROTECTED] writes:

 Of course, if you're using bash, then

   http://xkcd.com/{1..327}

 will do the job without all the messy syntax or the external program.

And, as we've all recently witnessed, if you need to put this in a script,
start it out with:

  #!/bin/bash

   How about that.  This thread is on-topic after all.  ;-)

And now it's even referencing *another* on-topic post :)

-- 
Seeya,
Paul
___
gnhlug-discuss mailing list
gnhlug-discuss@mail.gnhlug.org
http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/


[OT] xkcd

2007-10-10 Thread Kent Johnson
If you know what a SQL injection attack is, you will love this:
http://xkcd.com/327/

Kent
___
gnhlug-discuss mailing list
gnhlug-discuss@mail.gnhlug.org
http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/


Re: [OT] xkcd

2007-10-10 Thread Ben Scott
On 10/10/07, Kent Johnson [EMAIL PROTECTED] wrote:
 If you know what a SQL injection attack is, you will love this:
 http://xkcd.com/327/

  For those of you who hadn't already seen the above: xkcd is an
extremely excellent comic, and should be read by all geeks.

http://xkcd.com/149/

http://xkcd.com/37/

http://xkcd.com/272/

http://xkcd.com/129/

http://xkcd.com/293/

http://xkcd.com/285/

http://xkcd.com/225/

http://xkcd.com/150/

...etc...

-- Ben
___
gnhlug-discuss mailing list
gnhlug-discuss@mail.gnhlug.org
http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/


Re: [OT] xkcd

2007-10-10 Thread Bill Ricker
 If you know what a SQL injection attack is, you will love this:
 http://xkcd.com/327/

while xkcd++;

And if it doesn't make sense, you NEED to read this
http://en.wikipedia.org/wiki/SQL_injection_attack

-- 
Bill
[EMAIL PROTECTED] [EMAIL PROTECTED]
___
gnhlug-discuss mailing list
gnhlug-discuss@mail.gnhlug.org
http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/