A Practical Guide to the Unix System / Edition 3

A Practical Guide to the Unix System / Edition 3

by Mark G. Sobell
ISBN-10:
0805375651
ISBN-13:
9780805375657
Pub. Date:
08/23/1994
Publisher:
Pearson
ISBN-10:
0805375651
ISBN-13:
9780805375657
Pub. Date:
08/23/1994
Publisher:
Pearson
A Practical Guide to the Unix System / Edition 3

A Practical Guide to the Unix System / Edition 3

by Mark G. Sobell
$160.2 Current price is , Original price is $160.2. You
$160.20 
  • SHIP THIS ITEM
    This item is available online through Marketplace sellers.
  • PICK UP IN STORE
    Check Availability at Nearby Stores
$49.33 
  • SHIP THIS ITEM

    Temporarily Out of Stock Online

    Please check back later for updated availability.

    • Condition: Good
    Note: Access code and/or supplemental material are not guaranteed to be included with used textbook.

This item is available online through Marketplace sellers.


Overview

Combining the best of reference and tutorial guides, this bestselling book on Unix offers concise, readable coverage of SunOS 4.1.3 and Berkeley Software Distribution 4.3 (BSD). A Practical Guide to the Unix System, Third Edition is perfect for both novice and experienced users as it provides clear, straightforward coverage of a wide range of Unix commands and utilities. The book is divided into two parts. Part I provides a step-by-step tutorial for readers who want to use this operating system for programming, electronic mail, networking (including accessing the Internet), or other applications. Part II examines more than 75 Unix utility programs, with examples that are useful applications. In addition, appendixes cover the Posix Standards and the Ultrix version of Unix.

  • Includes complete chapters on the Korn Shell, the emacs text editor, and the vi editor
  • Contains a new chapter on Networking with coverage of many network structures and commands as well as detailed instruction on accessing the Internet using archie and gopher, how to transfer files using FTP, and a section on World Wide Web and Mosaic
  • Provides a new chapter on Graphical User Interfaces that discusses GUI components, the X Window System, and using and customizing Motif
  • Examines the make, SCCS, RCS, awk, and sed programming tools
  • Features detailed chapters on the Bourne and C shells with explanations of how to write shell programs (shell scripts)
  • Includes an in-depth chapter on the Korn shell that covers writing shell scripts and advanced concepts including recursion and the coprocess
  • Offers a quick overview of the UNIX system in Chapter 1
  • Provides coverage of text editing, electronic mail, shell programming, and other applications with examples, exercises, sample screens, and review questions incorporated throughout
  • References 75 of the most frequently used UNIX utilities in Part II
  • Includes clearly marked sections of optional advanced material for experienced UNIX users


0805375651B04062001

Product Details

ISBN-13: 9780805375657
Publisher: Pearson
Publication date: 08/23/1994
Edition description: REV
Pages: 800
Product dimensions: 6.20(w) x 9.00(h) x 1.70(d)

About the Author

Mark G. Sobell is president of Sobell Associates Inc., a consulting firm that specializes in UNIX/Linux training, support, and custom software development. He is the author of many best-selling UNIX and Linux books and has more than twenty-five years of experience working with UNIX and Linux.



Read an Excerpt


Chapter 9: The emacs Editor

In 1956, the Lisp (LISt Processing) language was developed at MIT by John McCarthy. In its original conception, Lisp had only a few scalar (called atomic) data types and only one data structure, a list. Lists could contain atomic data or perhaps other lists. Lisp supported recursion and non-numeric data (exciting concepts in those Fortran and COBOL days) and, in the Combridge culture at least, was once the favored implementation language. Richard Stallmon and Guy Steele were part of this MIT Lisp culture, and in 1975 they collaborated on emacs.

About emacs

Initially, emacs was prototyped as a series of editor commands or macros for the late-1960s text editor TECO (Text Editor and COrrector). The acronymic name, Editor MACroS, reflects these beginnings, although there have been many humorous reinterpretations including [ESCAPE [META] [ALT] [CONTROL] [SHIFT], Emacs Makes All Computing Simple, and the unkind translation Eight Megabytes And Constantly Swapping.

Since then, emacs has grown and evolved through more than twenty major revisions to the mainstream GNU version alone. The emacs editor is coded in C, and it contains a complete Lisp interpreter. It fully supports the X Window System and mouse interaction, and until very recently has been maintained by Stallman himself. The original TECO macros are long gone.

The emacs editor has always been considerably more than a text editor. Not having been developed originally in a UNIX environment, emacs does not adhere to the UNIX philosophy. Where a UNIX utility is typically designed to do one thing and to he used in conjunction with other utilities, emacs is designed to "do it all." Because there is a programming language (Lisp) underlying it, emacs users tend to customize and extend the editor rather than to use existing utilities or create new general-purpose tools. Instead, they share their emacs (customization) files.

Well before the X Window System, Stallman put a great deal of thought and effort into designing a window-oriented work environment, and he used emacs as his research vehicle. Over time, he built facilities within emacs for reading and composing email messages, for giving shell commands, for compiling programs and analyzing error messages, for running and debugging these programs, and for playing games. Eventually, it became possible to enter the emacs environment and not come out all day, switching from window to window and from file to file. If you had only an ordinary, serial, character-based terminal, emacs gave you tremendous leverage.

In an X Window System environment, emacs does not need to control the whole display, usually operating only one or two windows. However, part or all of the original work environment is still available for those who want to use it.

A language-sensitive editor, emacs has special features that you can turn on to help edit text, nroff, TeX, Lisp, C, Fortran, and so on. While these feature sets are called modes, they are not related in any way to the Command Mode and Input Mode found in vi and other editors. Because you never need to switch emacs between Input and Command Modes, emacs is called a modeless editor.

emacs vs. vi

Like vi, emacs is a display editor: it displays the text you are editing on the screen, and changes the display as you type each command or insert new text.

in Command Mode or Insert Mode: commands always use a [CONTROL] or other special key. The emacs editor always inserts ordinary characters.

This is called modeless editing, and for many people, it is convenient and natural.

As in vi, you edit a file in a work area, or buffer, and have the option of writing this buffer back to the file on the disk when you are finished. With emacs, however, you can have many work buffers, changing among them without having to write out and read back in. Furthermore, you can display multiple buffers at one time, each in its own window. This is often helpful in cut and paste operations or to keep C declarations in one window while editing related code in another part of the file in another window.

Like vi, emacs has a rich, extensive command set for moving about in the buffer and altering text, but in emacs this command set is not "cast in concrete." You can change or customize commands at any time. Literally any key can be coupled, or bound, to any command, to better match a particular keyboard or just to fulfill a personal whim. Usually key bindings are set in the emacs startup file, but they can also be changed interactively during a session. All the key bindings described in this chapter are standard on GNU emacs version 18.59. Although version 19 added many visual, mouse-oriented capabilities, all of the commands described in this chapter still work with the new version.

Caution
If you change too many key bindings, you can easily produce a command set that you will not remember, or that will make it impossible for you to get back to the standard bindings again in the same session.

Finally, and very unlike vi, emacs allows you to use Lisp to write new commands or override old ones. Stallman calls this feature on-line extensibility, but it would take a gutsy Lisp guru to write and debug a new command while editing live text. It's much more common to add a few extra debugged commands to the .emacs file where they will be loaded automatically when emacs starts up.

Getting Started

The emacs editor has many, many features and there are many ways to use it. Its complete manual had 29 chapters before the X window upgrade in Version 19. However, you can do a considerable amount of meaningful work with a relatively small subset of the commands. This section describes a simple editing session, explaining how to start and exit from emacs, and how to move the cursor and delete text. It postpones or simplifies some issues in the interest of clarity.

Starting emacs
To edit a file named sample, type the shell command:

$ emacs -q sample

This command starts emacs, reads the file named sample into a buffer, and displays its contents on the screen. If there is no file by this name, it displays a blank screen with New File at the bottom (Figure 9- 1). The -q option tells emacs not to read the .emacs startup file from your home directory. This will guarantee that you get standard uncustomized behavior, and is sometimes useful for beginners or for other users wanting to bypass a .emacs file.

The screen starts out with a single window. At the bottom of this window is a reverse-video title bar called the Mode Line. The Mode Line, at a minimum, shows the name of the buffer that the window is viewing, whether the buffer has been changed, what major and minor modes are in effect, and how far down the buffer the window is currently positioned. When you have more than one window, there is one Mode Line in each window. At the bottom of the screen emacs leaves a single line open called the Echo Area or Minibuffer. This line is for short messages and special one-line commands. . . .

Table of Contents



The UNIX System.


The UNIX Operating System.


Getting Started.


An Introduction to the Utilities.


The File Structures.


The Shell.


Graphical user Interfaces.


Networking.


The VI Editor.


The EMACS Editor.


The C Shell.


The Korn Shell and Advanced Shell Programing.


Programming Tools.


System Administration.


The UNIX Utilitiy Programs.


Appendix. Regular Expressions.


Appendix. DEC Ultrix.


Appendix. The POSIX Standards. 0805375651T04062001
From the B&N Reads Blog

Customer Reviews