LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] Bash me up

[ILUG] Bash me up

Brian Foster blf at blf.utvinternet.ie
Sat Jul 16 10:49:25 IST 2005


  | From: Karl Carlile <futurus at eircom.net>
  | Date: Fri, 15 Jul 2005 21:13:28 +0100
  | 
  | I have been seriously applying myself to BASH and an
  | still not certain what the benefits in mastering it are.

 knowing a little bit about bash(1) will, among other things:

  (a) assist in _using_ Linux.  each terminal window (e.g.)
      is running bash.   (pedants: you know what I mean!)
      you cannot always avoid what is called the command-line
      in Linux; "the command-line" means a terminal window;
      and that mean `bash'.

  (b) many configuration files, useful tips, and so on are
      all written in bash.  if you ever need to change one,
      having some idea what the stuff means is a good idea.

  (c) a huge number of applications use bash somewhere at
      some time during normal operation (not to mention
      also during installation).  you may not care about
      that, unless you want to write, fix, or contribute
      to an application.   that "application" might just
      quite possibly be a small thingie you need to solve
      some problem (that is perhaps what most scripts are
      written to do — being able to cook up a script to
      deal with some issue is a valuable skill saving
      lots of time and frustration).   then you may very
      possibly need to have a working understanding of
      bash scripting.

  (d) improve your knowledge.  (and your job prospects, if
      working in software et.al. industry interests you.)

 except, perhaps, for `d', none of what I have listed above
 (which is by no means complete!) requires you to be a bash
 expert.  IMHO, `c' should, but the general quality of far
 too many bash scripts is so poor (again, IMHO) knowing what
 you are doing seems to be a minority opinion....  ;-(


  | There is emacs which seems to have s a somewhat different lingo
  | to BASH.  [ ... ] What are the different functions they each serve.

 emacs is an editor.  it's purpose is to create and change
 text files.  (it does a lot more, but at its core, it is
 an editor.  (pedants: shut up!))

 bash is an interpreter (of a class called "shells").
 its purpose is to execute applications (programs).

 the two programs — bash and emacs — have very different
 core (main) purposes.

  | [ ... ]  Why the different languages.  [ ... [

 because there are hundreds — thousands — of different
 computer languages?  ADA, algol, antlr, AWK, B, BCPL,
 BASIC, bash, BLISS, C, C++, COBOL, Coral, D, doxygen,
 Effiel, FORTRAN, forth, haskell, IDL, Java, JCL, LaTeX,
 lex, lisp, make, mortran, mk, m4, nroff, PASCAL, python,
 perl, ruby, runoff, SIMULA, sed, SETL, smalltalk, SNOBOL,
 TECO, tcl, wml, and yacc, to name a very small number.
 each has a purpose, and whilst some are similar or
 related or even use each other, most of those I listed
 are quite different from one another.  and tend to have
 variants, with each variation a bit different yet again.

 no one or two or three languages is ideal for _all_
 purposes.  some are toys or just plain stupid, and
 others are elegant, and others a mess but useful,
 and some really do only one thing (but nominally
 do that one thing very very well), and on and on
 and on.  and on.

 e.g., at my job, I invented a small language
 specifically designed to test the IDL compiler
 I currently maintain.  this specialised testing
 language is interpreted by an c.1000-line bash
 script, which in turn uses sed(1) and make(1)
 amongst several other languages, and is itself
 nominally run from a PHP(? I think?) script on
 an automated machine testing farm, accessed via
 a front-end written in HTML.


  | Finally are there no online texts that pose problems for
  | BASH students so that  they can use their knowledge and
  | skill to solve them using BASH.

 sorry, no idea here (at least, not about on-line
 texts-with-exercises).  there _are_ some good
 hardcopy books with exercises about shell scripting.
 (the one I am thinking of especially is, AFAICR,
 at work, so I cannot provide a reference until next
 week — especially as I can't recall the title!  and
 it is an older volume, so it may be out-of-print?)

 a mentor and studying _good_ scripts is, IMHO, better
 than a textbook, but that may not apply to everyone.

 if I may guess, you seem to be trying to tackle
 many things at once — or at least are conflating
 together separate things — and quite understandably
 being confused.  nothing wrong with that, it is a
 natural tendency, but you will very probably make
 faster progress of a higher quality and with a
 lot more _fun_ if you separate out things as you
 learn they are separable.  e.g., bash, emacs,
 and lisp are all quite separable.  pick one,
 and study/learn/play with it.  or at least try
 studying/leaning/playing with each at different
 times, rather than all mixed together at once.

cheers!
	-blf-
-- 
Experienced (20+ yrs) kernel/software Eng: | Brian Foster   Montpellier,
 • Unix, embedded, &tc;  • Linux;  • doc;  | blf at utvinternet.ie   FRANCE
 • IDL, automated testing, process, &tc.   |  Stop E$$o (ExxonMobile)!
Résumé (CV) http://www.blf.utvinternet.ie  |     http://www.stopesso.com



More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell