[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference turris::digital_unix

Title:DIGITAL UNIX(FORMERLY KNOWN AS DEC OSF/1)
Notice:Welcome to the Digital UNIX Conference
Moderator:SMURF::DENHAM
Created:Thu Mar 16 1995
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:10068
Total number of notes:35879

9194.0. "UNIX script writing primer?" by SANITY::LEMONS (And we thank you for your support.) Fri Mar 14 1997 21:34

    Hi
    
    Can anyone suggest a good UNIX script writing primer?
    
    Thanks!
    tl
T.RTitleUserPersonal
Name
DateLines
9194.1VAXCPU::michaudJeff Michaud - ObjectBrokerSat Mar 15 1997 02:315
> Can anyone suggest a good UNIX script writing primer?

	Which UNIX scripting language(s) are you interested in?

	C-shell, Korn-shell, Bourne-shell, Tcl, Pearl, awk, .....
9194.2SANITY::LEMONSAnd we thank you for your support.Sat Mar 15 1997 03:597
    Well, for supportability reasons, I'd rather not go with tcl or perl. 
    I'd rather stay within one of the standard shells (csh, ksh, sh).  What
    I now need is to be able to create a for or while loop, and do file
    I/O.  Is any one better than the other?
    
    Thanks!
    tl
9194.3CFSCTC::SMITHTom Smith MRO1-3/D12 dtn 297-4751Sat Mar 15 1997 15:2218
    For scripting, you can eliminate csh if you're smart (see
    http://www.see.mro.dec.com/csh_programming_considered_harmful.txt ).
    For the Bourne-based shells, you may as well learn ksh or the POSIX
    shell (they're similar, and Bourne shell is a subset of each). The
    O'Reilly book _Learning the Korn Shell_ is pretty good.
    
    However, I wouldn't be too quick to dismiss Perl. It may not
    necessarily come bundled with every OS, but it's available for most,
    it's free, and it's a lot more "standard" as a CGI scripting language
    than the others - partly because it leaves fewer security holes than raw
    shell languages. I'm not sure what to recommend as a text, other than
    to point you at O'Reilly again, but the reference manual is on-line at
    http://www-cgi.cs.cmu.edu/cgi-bin/perl-man . For a quick intro, see
    http://www.iftech.com/oltc/webdev/webdev_perl.stm , and for a more
    comprehensive list of on-line Perl resources, see
    http://webreference.com/programming/perl.html .
        
    -Tom
9194.4tcl/tk is on Digital Unix (4.0 +)SUBPAC::FARICELLISun Mar 16 1997 23:436
   Nor would I dismiss tcl. Tcl/Tk are supposed to be part of all
   V4.0 Digital Unix systems. But I am notoriously biased when it comes
   to tcl/tk.

   -- John Faricelli
9194.5"UNIX Shells by Example" is goodKOLOR::MCGOWANTom McGowan,PK02-1/J80,DTN 223-2076Mon Mar 17 1997 13:525
    I just got "UNIX Shells by Example", by Ellie Quigley (Prentice Hall),
    and I'm happy with it. It covers the Korn, Bourne, and C shells.

    - tom
    
9194.6Arthur & BurnsUSMV01::DOUCETTEUse your judgementMon Mar 17 1997 14:525
	"Unix Shell Programming" by Lowell Jay Arthur & Ted Burns is a very
	good intro to shell programming(bourne, korn, and csh).

	Paul
9194.7UNIX Shell Programming by Kochan and WoodDECC::SULLIVANJeff SullivanTue Mar 18 1997 21:4112
I used this book in a shell programming class and it's a pretty good
introductory text. It covers mostly the Bourne shell, but also covers the Korn
shell a little. The book is copyright 1985, so I'd only get it if there were a
newer edition available.

I read/heard long ago that the Bourne shell was the preferred programming
language, so I've used it right from the start. I use the other shells described
in the earler notes if I need a specific feature.

fwiw, I have this book on my desk, though, and refer to it often.

-Jeff
9194.8Where is tcl man page?IOSG::MARSHALLMon Mar 24 1997 16:0114
re .0: Personally, I always found the man pages more than adequate, but maybe
that says more about me than about the man pages :-)

re .4:
$ man tcl
No reference page found for tcl.
$ tcl
tcl>

Yup, so I have tcl on my UNIX V4.0 system, but no help on using it.  Is there a
man page, and if so where?

Ta,
Scott
9194.9SMURF::DENHAMDigital UNIX KernelMon Mar 24 1997 17:5230
    Well, using the help command at the tcl> prompt can get
    you some more information. Not sure how useful it is.
    
    E.g.,
    
    tcl>help tcl/signals/signal
           signal action siglist ?command?
                  Specify  the  action  to take when a Unix signal is
                  received by Extended Tcl, or a program that  embeds
                  it.   Siglist  is  a list of either the symbolic or
                  numeric Unix signal (the SIG prefix  is  optional).
                  Action  is  one of the following actions to be per-
                  formed on receipt of the signal.   To  specify  all
                  modifiable  signals, use `*' (this will not include
                  SIGKILL and SIGSTOP, as they can not be  modified).
    
                  default - Perform system default action when signal
                  is received (see signal system call documentation).
    
                  ignore - Ignore the signal.
    
                  error - Generate a catchable Tcl error.  It will be
                  as if the command  that  was  running  returned  an
                  error.  The error code will be in the form:
                      POSIX SIG signame
                  For  the death of child signal, signame will always
                  be SIGCHLD, rather than SIGCLD,  to  allow  writing
                  portable code.
    
    
9194.10Sigh. Why don't we put the man pages on the base oS?SUBPAC::FARICELLIMon Mar 24 1997 20:469
   RE: man pages. Pull the approriate tcl/tk kit for the version
   supplied on Digital Unix from the Internet (I believe it's
   tcl7.3/tk4.0, but I don't have V4 installed anywhere I can look).
   It has a complete set of man pages.

   Or I can email them to you ;-)

   -- John Faricelli
9194.11some www places to startHGOVC::JOELBERMANThu Mar 27 1997 03:477
    Start with the FAQ at
    http://www.NeoSoft.com/tcl/ftparchive/FAQ/part1.html
    
    4 powerpoint overviews are in ftp://ftp.sunlabs.com/pub/tcl/tut.tar.Z
    
    /joel
    
9194.12GERUND::WOLFEI'm going to huff, and puff, and blow your house downThu Mar 27 1997 15:485
We do ship tclhelp in v4.0 (/usr/ucb/tclhelp) which is a Tk interface
to man-page like tcl, extended Tcl, tk stuff. Not much use from a cct
but fine for devlopement in front of a workstation. 

			pete
9194.13Is the nroff source for the tcl help provided?SUBPAC::FARICELLIThu Mar 27 1997 19:378
   Since I don't have access to a 4.0 system I have to guess at these
   things, but for tclhelp to display the help files for tcl/tk/etc.
   one would assume that the nroff source is on the system somewhere.
   If you have those, then you are golden. Just give the "man"
   the alternate directory to use.

   -- John
9194.14GERUND::WOLFEI'm going to huff, and puff, and blow your house downFri Mar 28 1997 22:445
Nope. I just checked. The files are in /usr/lib/tcl/tclX/help/. They are just
already-formatted man pages (i.e. text files)  that tclhelp displays in a text
widget. 

			Pete