discuss: Thread: Bash for sysadmins and power users


[<<] [<] Page 1 of 1 [>] [>>]
Subject: Bash for sysadmins and power users
From: Machtelt Garrels ####@####.####
Date: 26 Jun 2003 18:32:57 -0000
Message-Id: <Pine.LNX.4.44.0306261250420.25178-100000@server1.us.soti.org>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Dear TLDPers,

After David Lawyer's recent remark (I think it was him, anyway) that we 
need as many docs on a given subject as possible, I started thinking it 
over and following the discussion, I saw the reason in this.

So I decided to polish a document that I have, until now primarily for 
personal use, called "Bash for Sysadmins and Power Users", and ask wether 
you like it enough to submit to TLDP.
It has been more or less reviewed, different parts by different people, 
and spell-checked for the largest part.  It follows the same basic 
principle as the Intro to Linux guide: exercises after each chapter.  It's 
12 chapters, I think it's for the guides section if you want to do 
anything with it.

For now, you can view this doc from

http://tille.soti.org/training/bash

An archive of the sources (in XML) is available from 

http://tille.soti.org/training/Bash.tar.bz2

The main reason why I wrote it is because I think the Bash HOWTO is 
insufficient, and the Bash Programming guide is too much of a reference 
guide, it frightens beginners.

Let me know if it is suitable for submission or not,

Tille.


- -- 

My Penguin, my freedom.		http://tille.soti.org


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE++zxYsIIUbMXbBA8RAp7EAJ9Z93LG7Iud3MYcrvJKaFCswg0cJgCdEXsW
R7gICDAyvT/62Xd/WA0UTZ0=
=t0eq
-----END PGP SIGNATURE-----

Subject: Re: Bash for sysadmins and power users
From: "M. Leo Cooper" ####@####.####
Date: 26 Jun 2003 18:55:54 -0000
Message-Id: <Pine.LNX.4.33.0306261152320.1971-100000@localhost.localdomain>

On Thu, 26 Jun 2003, Machtelt Garrels wrote:

> So I decided to polish a document that I have, until now primarily for 
> personal use, called "Bash for Sysadmins and Power Users", and ask wether 
> you like it enough to submit to TLDP.
> It has been more or less reviewed, different parts by different people, 
> and spell-checked for the largest part.  It follows the same basic 
> principle as the Intro to Linux guide: exercises after each chapter.  It's 
> 12 chapters, I think it's for the guides section if you want to do 
> anything with it.

I suggest you read my "Advanced Bash Scripting Guide," also hosted on the LPD,
before making a decision on this.


Mendel

Subject: Re: Bash for sysadmins and power users
From: Machtelt Garrels ####@####.####
Date: 26 Jun 2003 20:18:46 -0000
Message-Id: <Pine.LNX.4.44.0306261505510.25683-100000@server1.us.soti.org>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thu, 26 Jun 2003, M. Leo Cooper wrote:

> On Thu, 26 Jun 2003, Machtelt Garrels wrote:
> 
> > So I decided to polish a document that I have, until now primarily for 
> > personal use, called "Bash for Sysadmins and Power Users", and ask wether 
> > you like it enough to submit to TLDP.
<--snip-->
> 
> I suggest you read my "Advanced Bash Scripting Guide," also hosted on the LPD,
> before making a decision on this.

I've read it, and I refer to it in several of my documents.  So I can 
assure you no offence is meant, your guide is a good reference 
for Bash, but it is, imho, too much for what most people need.  

My background in this is as a Sun/Solaris teacher, I sometimes have to 
teach the Sun Korn Shell programming course.  And then people often ask, 
how about this or that feature in Bash, so I decided, for starters for my 
own reference, to make sort of a Bash equivalent of that course.  So it is 
more user oriented, and we leave out the "advanced" keyword.  

Let me make it very clear that I need the Advanced Bash Scripting Guide, 
this is meant to be an addition, or rather a prelude, and not something 
on the lines of I-can-do-this-better.  Except that it tries to be better 
than the Korn shell course, but with Bash, that's not all too difficult 
;-)

Best regards,

Tille.




- -- 

My Penguin, my freedom.		http://tille.soti.org


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE++1UlsIIUbMXbBA8RAkSFAJ9/KlPybD2eSIvjPk//N6KIrkivewCgoveI
Aq40JAPNlmCyQphb5d7zLi4=
=zKZa
-----END PGP SIGNATURE-----

Subject: Re: Bash for sysadmins and power users
From: Guylhem Aznar ####@####.####
Date: 30 Jun 2003 17:38:33 -0000
Message-Id: <20030630194214.5a209742.athome@externe.net>

On Thu, 26 Jun 2003 13:32:52 -0500 (CDT)
Machtelt Garrels ####@####.#### wrote: 
> personal use, called "Bash for Sysadmins and Power Users", and ask wether 
> you like it enough to submit to TLDP.

Please do. It's very welcome.

-- 
####@####.#### ####@####.####
http://externe.net/geekcode http://externe.net/photos http://externe.net/zaurus
GPG: 92EB37C1 DD11C9C9 20519D01 E8FA1B11 42975AF7     http://externe.net/pubkey
Envie de me remercier pour mon travail ? Faites un don _ ####@####.#### !
Enjoying my work? Want to thank me? Donations to ####@####.#### are welcome!

--> -->
 
 
<type 'exceptions.IOError'>
Python 2.5.2: /usr/bin/python
Sat Jul 6 03:03:40 2024

A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.

 /opt/ezmlm-browse-0.20/<string> in ()
 /opt/ezmlm-browse-0.20/main.py in main()
  424 
  425         if path is not None:
  426                 main_path(path)
  427         else:
  428                 main_form()
global main_form = <function main_form at 0x85e8c6c>
 /opt/ezmlm-browse-0.20/main.py in main_form()
  378         except ImportError:
  379                 die(ctxt, "Invalid command")
  380         module.do(ctxt)
  381 
  382 def main():
module = <module 'commands.showthread' from '/opt/ezmlm-browse-0.20/commands/showthread.pyc'>, module.do = <function do at 0x85f187c>, global ctxt = {'HTTP_X_FORWARDED_SERVER': 'glitch', 'HTTP_REFE...HTTP_ACCEPT_ENCODING': 'gzip, br, zstd, deflate'}
 /opt/ezmlm-browse-0.20/commands/showthread.py in do(ctxt={'HTTP_X_FORWARDED_SERVER': 'glitch', 'HTTP_REFE...HTTP_ACCEPT_ENCODING': 'gzip, br, zstd, deflate'})
    9         ctxt.update(ezmlm.thread(ctxt[THREADID]))
   10         header(ctxt, 'Thread: ' + ctxt[SUBJECT], 'showthread')
   11         do_list(ctxt, 'msgs', ctxt[MSGSPERPAGE], ctxt[MESSAGES],
   12                         lambda:sub_showmsg(ctxt, ctxt[MSGNUM]))
   13         footer(ctxt)
global sub_showmsg = <function sub_showmsg at 0x85e81ec>, ctxt = {'HTTP_X_FORWARDED_SERVER': 'glitch', 'HTTP_REFE...HTTP_ACCEPT_ENCODING': 'gzip, br, zstd, deflate'}, global MSGNUM = 'msgnum'
 /opt/ezmlm-browse-0.20/globalfns.py in do_list(ctxt={'HTTP_X_FORWARDED_SERVER': 'glitch', 'HTTP_REFE...HTTP_ACCEPT_ENCODING': 'gzip, br, zstd, deflate'}, name='msgs', perpage=10, values=[{'author': u'Machtelt Garrels', 'authorid': 'ceejnklaecengajdijnf', 'date': '26 Jun 2003 18:32:57 -0000', 'month': 200306, 'msgnum': 4651, 'subject': u'Bash for sysadmins and power users', 'threadid': 'dackopjomamnhamiklak', 'timestamp': 1056652377.0}, {'author': u'M. Leo Cooper', 'authorid': 'gogpemcpgmjdagijfkka', 'date': '26 Jun 2003 18:55:54 -0000', 'month': 200306, 'msgnum': 4653, 'subject': u'Re: Bash for sysadmins and power users', 'threadid': 'dackopjomamnhamiklak', 'timestamp': 1056653754.0}, {'author': u'Machtelt Garrels', 'authorid': 'ceejnklaecengajdijnf', 'date': '26 Jun 2003 20:18:46 -0000', 'month': 200306, 'msgnum': 4654, 'subject': u'Re: Bash for sysadmins and power users', 'threadid': 'dackopjomamnhamiklak', 'timestamp': 1056658726.0}, {'author': u'Guylhem Aznar', 'authorid': 'fjghdeinimkjhbapdmej', 'date': '30 Jun 2003 17:38:33 -0000', 'month': 200306, 'msgnum': 4658, 'subject': u'Re: Bash for sysadmins and power users', 'threadid': 'dackopjomamnhamiklak', 'timestamp': 1056994713.0}], peritem=<function <lambda> at 0x85f1a04>)
  128                 write(template % ctxt)
  129                 if peritem:
  130                         peritem()
  131                 ctxt[ROW] += 1
  132 
peritem = <function <lambda> at 0x85f1a04>
 /opt/ezmlm-browse-0.20/commands/showthread.py in ()
    9         ctxt.update(ezmlm.thread(ctxt[THREADID]))
   10         header(ctxt, 'Thread: ' + ctxt[SUBJECT], 'showthread')
   11         do_list(ctxt, 'msgs', ctxt[MSGSPERPAGE], ctxt[MESSAGES],
   12                         lambda:sub_showmsg(ctxt, ctxt[MSGNUM]))
   13         footer(ctxt)
global sub_showmsg = <function sub_showmsg at 0x85e81ec>, ctxt = {'HTTP_X_FORWARDED_SERVER': 'glitch', 'HTTP_REFE...HTTP_ACCEPT_ENCODING': 'gzip, br, zstd, deflate'}, global MSGNUM = 'msgnum'
 /opt/ezmlm-browse-0.20/globalfns.py in sub_showmsg(ctxt={'HTTP_X_FORWARDED_SERVER': 'glitch', 'HTTP_REFE...HTTP_ACCEPT_ENCODING': 'gzip, br, zstd, deflate'}, msgnum=4658)
  229         format_timestamp(ctxt, ctxt)
  230         write(html('msg-header') % ctxt)
  231         rec_showpart(ctxt, msg, 0)
  232         write(html('msg-footer') % ctxt)
  233         ctxt.pop()
global rec_showpart = <function rec_showpart at 0x85e81b4>, ctxt = {'HTTP_X_FORWARDED_SERVER': 'glitch', 'HTTP_REFE...HTTP_ACCEPT_ENCODING': 'gzip, br, zstd, deflate'}, msg = <email.message.Message instance at 0x8645e0c>
 /opt/ezmlm-browse-0.20/globalfns.py in rec_showpart(ctxt={'HTTP_X_FORWARDED_SERVER': 'glitch', 'HTTP_REFE...HTTP_ACCEPT_ENCODING': 'gzip, br, zstd, deflate'}, part=<email.message.Message instance at 0x8645e0c>, partnum=1)
  205                 else:
  206                         for p in part.get_payload():
  207                                 partnum = rec_showpart(ctxt, p, partnum+1)
  208         else:
  209                 write(html('msg-sep') % ctxt)
partnum = 1, global rec_showpart = <function rec_showpart at 0x85e81b4>, ctxt = {'HTTP_X_FORWARDED_SERVER': 'glitch', 'HTTP_REFE...HTTP_ACCEPT_ENCODING': 'gzip, br, zstd, deflate'}, p = <email.message.Message instance at 0x864b06c>
 /opt/ezmlm-browse-0.20/globalfns.py in rec_showpart(ctxt={'HTTP_X_FORWARDED_SERVER': 'glitch', 'HTTP_REFE...HTTP_ACCEPT_ENCODING': 'gzip, br, zstd, deflate'}, part=<email.message.Message instance at 0x864b06c>, partnum=2)
  208         else:
  209                 write(html('msg-sep') % ctxt)
  210                 sub_showpart(ctxt, part)
  211         return partnum
  212 
global sub_showpart = <function sub_showpart at 0x85e8144>, ctxt = {'HTTP_X_FORWARDED_SERVER': 'glitch', 'HTTP_REFE...HTTP_ACCEPT_ENCODING': 'gzip, br, zstd, deflate'}, part = <email.message.Message instance at 0x864b06c>
 /opt/ezmlm-browse-0.20/globalfns.py in sub_showpart(ctxt={'HTTP_X_FORWARDED_SERVER': 'glitch', 'HTTP_REFE...HTTP_ACCEPT_ENCODING': 'gzip, br, zstd, deflate'}, part=<email.message.Message instance at 0x864b06c>)
  164         type = ctxt[TYPE] = part.get_content_type()
  165         ctxt[FILENAME] = part.get_filename()
  166         template = html('msg-' + type.replace('/', '-'))
  167         if not template:
  168                 template = html('msg-' + type[:type.find('/')])
global template = <function template at 0x85e0e9c>, global html = <function html at 0x85e0ed4>, type = 'application/pgp-signature', type.replace = <built-in method replace of str object at 0x864af00>
 /opt/ezmlm-browse-0.20/globalfns.py in html(name='msg-application-pgp-signature')
   40 
   41 def html(name):
   42         return template(name + '.html')
   43 
   44 def xml(name):
global template = <function template at 0x85e0e9c>, name = 'msg-application-pgp-signature'
 /opt/ezmlm-browse-0.20/globalfns.py in template(filename='msg-application-pgp-signature.html')
   31         except IOError:
   32                 if not _template_zipfile:
   33                         _template_zipfile = zipfile.ZipFile(sys.argv[0])
   34                 try:
   35                         f = _template_zipfile.open(n).read()
global _template_zipfile = None, global zipfile = <module 'zipfile' from '/usr/lib/python2.5/zipfile.pyc'>, zipfile.ZipFile = <class zipfile.ZipFile at 0x8579a7c>, global sys = <module 'sys' (built-in)>, sys.argv = ['-c', '/opt/ezmlm-browse-0.20']
 /usr/lib/python2.5/zipfile.py in __init__(self=<zipfile.ZipFile instance at 0x8645fec>, file='-c', mode='r', compression=0, allowZip64=False)
  337             self.filename = file
  338             modeDict = {'r' : 'rb', 'w': 'wb', 'a' : 'r+b'}
  339             self.fp = open(file, modeDict[mode])
  340         else:
  341             self._filePassed = 1
self = <zipfile.ZipFile instance at 0x8645fec>, self.fp = None, builtin open = <built-in function open>, file = '-c', modeDict = {'a': 'r+b', 'r': 'rb', 'w': 'wb'}, mode = 'r'

<type 'exceptions.IOError'>: [Errno 2] No such file or directory: '-c'
      args = (2, 'No such file or directory')
      errno = 2
      filename = '-c'
      message = ''
      strerror = 'No such file or directory'