OT: base64 decoding
wdg3rd at comcast.net
wdg3rd at comcast.net
Sat May 9 07:13:57 PDT 2009
Like Bill, I learned shell programming by reading the code of other folks. The first stock script I recall modifying (on every system that left my RSCC, aside from the first few) was the software installation script that originally mounted installation floppies Read/Write -- no system left the Los Angeles RSCC in that condition from 2/83 at the latest.
Yeah, John, Bill's method of commenting has worked since the V7 Tandy Xenix 1.0 days. It works in the various supersets of the Bourne shell (bash, ksh) but we all mostly use the subset unless we need something extra anyway. (I don't need arrays that often in shell scripts).
By the way, John, what's the status of the Scripsit source? What are you asking for it?
--
Ward Griffiths wdg3rd at comcast.net
> Message: 1
> Date: Fri, 8 May 2009 03:59:20 -0400
> From: "John Esak" <john at valar.com>
> Subject: RE: OT: base64 decoding
> To: <bill at celestial.com>
> Cc: filepro-list at lists.celestial.com
> Message-ID: <200905080759.n487xKYf089585 at admin114.securesites.net>
> Content-Type: text/plain; charset="us-ascii"
>
> Cool, thanks again,
>
> I didn't even know that was possible in shell... Bourne?? I'll check
> now.
> Hope it's just not all the enhanced shells like c, k, t, etc. I
> still
> (stupidly I know) use the Bourne shell a lot. I'm kind of forced to
> used
> bash though on so many machines, I'm sure it will work there. I guess
> my
> SCO (mostly Bourne) days are really pretty much over except for some
> old
> client/cousins and my own stupid home machine. :-)
>
> John
>
>
> > -----Original Message-----
> > From: Bill Campbell [mailto:bill at celestial.com]
> > Sent: Friday, May 08, 2009 1:34 AM
> > To: John Esak
> > Subject: Re: OT: base64 decoding
> >
> > On Thu, May 07, 2009, John Esak wrote:
> > >I like that tip... Thanks.
> >
> > John:
> >
> > You are welcome.
> >
> > That's something I started doing when debugging shell scripts.
> >
> > Another trick is to double the braces on compound statements:
> >
> > In python:
> >
> > if someboolean: #{{
> > do something here on true
> > #}
> > elif anotherboolean: #{
> > something else
> > #}
> > else: #{
> > finally
> > #}}
> >
> > In shell scripts:
> >
> > if [ sometest ] ; then #{{
> > something
> > #}
> > else #{
> > something else
> > fi #}}
> >
> > ...
> > Bill
> > --
> > INTERNET: bill at celestial.com Bill Campbell; Celestial Software
> LLC
> > URL: http://www.celestial.com/ PO Box 820; 6641 E. Mercer Way
> > Voice: (206) 236-1676 Mercer Island, WA 98040-0820
> > Fax: (206) 232-9186 Skype: jwccsllc (206) 855-5792
> >
> > Scientists are explorers. Philosophers are tourists. --
> > Richard Feynman
> >
>
>
More information about the Filepro-list
mailing list