OS/2, Unix Style

Total Page:16

File Type:pdf, Size:1020Kb

OS/2, Unix Style INTERNATIONAL EXTRA REVIEW OS/2, Unix Style Tom Yager he promise of OS/2 is to release Hamilton C Shell This rule doesn't always apply, how­ users and developers alike from ever. While both shells provide the abil­ the shackles of8088-compliant ity to run processes in the background, Tenvironments. Lifting the 640K­ andMKSOSI2 the Hamilton C Shell offers a more Unix­ byte memory restriction opened the door like implementation. With the C Shell, to all kinds of more potent applications. Toolkit provide you can list background jobs with ps and In this case, the applications are a pair of terminate them with kill (Unix com­ Unix-type shells that add command-line mandsthat the MKS Toolkit does not and interpreted language-processing ca­ Unix-like shells provide). In fact, background jobs pabilities to OS/2. started from the MKS Toolkit shell seem Hamilton Laboratories has created its !orOS12 unstoppable. own version of the popular Berkeley C shell, the Hamilton C Shell 1.04. Its Command-Line Processing name is derived from the C-like syntax of The ability to interactively edit the com­ its shell scripts. Mortice Kern Systems' mand line is something relatively new, MKS OS/2 Toolkit 3. 1 includes a port of start-up commands from a home direc­ even to Unix. The standard Unix C shell AT&T's Kornshell (named for the shell's tory. OS/2 has no concept of separate doesn't have this capability, although original author, David Korn). This shell users, so this home directory is defined modified versions exist that can handle is a superset of an older AT&T invention, through an environment variable. The it. The Hamilton C Shell features a com­ the Bourne shell. shells also require the definition of a sep­ fortable mix of command history and Both packages include a variety of arate command search path, usually via editing, using the editing keys. The up Unix-like commands to make the OS/2 the start-up files. and down arrow keys scroll through pre­ environment a bit more palatable. Hamil­ Several commands that OS/2 users viously entered commands, and other ton ships 22 additional executable files take for granted are implemented inside keys act as labeled. The MKS Toolkit with its C shell, while MKS provides CMD.EXE, the default OS/2 command shell follows the lead of its implementer, 102. Still, the Unix user trained to type interpreter, and disappear when an al­ providing command-line editing in the ls and pwd will derive great comfort ternative shell is used. The Hamilton C style of either vi, the standard Unix full­ from the availability of these and other Shell is shipped with aliases that invoke screen editor, or EMACS, a popular al­ frequently used Unix commands. CMD.EXE to execute the built-in com­ ternative. In this case, only the arrow To install the C Shell, you manually mands, such as DIR and COPY. You can keys have significance. Other functions copy its executable files to their own modify the MKS Toolkit shell similarly, must be invoked through editor-specific directory on the hard disk. The binary but the· standard configuration includes commands or control sequences. Users files are in a subdirectory ( \ bin) on the no predefined aliases for OS/2 com­ familiar with either vi or EMACS will floppy disk. Next, you execute a utility, mands. feel right at home. dumpenv; it resides in the floppy disk's This brings up an interesting point Both shells maintain a running history root directory and must be copied sepa­ about the differences between the two of shell commands, and you can reinvoke rately. shells. The MKS Toolkit shell mimics a previously executed command lines by The MKS Toolkit includes an installa­ Unix environment as closely as possible. reference, using either the command's tion utility, but it also offers the option of When a decision had to be made between sequence number or a portion of its con­ copying the files manually. The auto­ Unix behavior and that of OS/2, Unix tent. The C Shell is a little better at this, matic installation places files in Unix­ frequently won out. As a result, file­ since a command line can refer to any like directories under the directory that names are built with forward slashes (I) number. of previous commands. For in­ is named in the environment variable instead of backslashes, and the escape stance, to reexecute the first three com­ ROOTDIR. (or "next character is literal") character mands of the session, the C Shell se­ is the backslash, not OS/2's caret C). In quence would be !1; !2; !3. The MKS Using the Shells contrast, the Hamilton C Shell is built to Toolkit shell mechanism provides no Both shells run in either full-screen or let experienced OS/2 users adapt with such straightforward way to combine windowed mode, and it's easy to set up little hassle. The default filename, es­ previous commands. It does, however, selections for them in the Start Programs cape, and command option characters allow editing the history file so that you window. As in Unix, both shells read are those of OS/2. continued Reprinted with permission from the February 1990 issue of BYTE Magazine. Copyright © by McGraw-Hill, Inc., New York 10020. All rights reserved. OS/2, UNIX STYLE to the C shell might be better off finding cided edge; it's likely that the size of the another tutorial. I'm familiar with the shell script could have been cut by a Unix versions of the C shell but was con­ Company third. Instead, I used only features inter­ fused by some of the manual's tutorial Hamilton Laboratories nal to each shell, plus selected external sections. Even so, it would be possible 13 Old Farm Rd. commands that I couldn't do without. for a newcomer to grasp the shell, armed Wayland, MA 01778 Both scripts make use of defined func­ with the manual and plenty of time to try (508) 358-5715 tions, string arrays, and other program­ the examples and permute them into use­ Hardware Needed oriented features of the languages. The ful variations. IBM PC, AT, PS/2, or compatible options list, read, delete, and send are The MKS Toolkit manuals show ex­ themselves separate functions. Listing cellent organization, but the content Software Needed message headers requires reading every needs work. The reference manual is laid OS/2 1.1 or higher, or SDK 1.06 or message file and displaying lines starting out as Unix documentation, so anyone fa­ higher with From: , Subj ect: , and Date: . miliar with Unix should find his or her The MKS Toolkit shell script came to­ way easily. In the case of the MKS Tool­ Documentation gether quickly and ran smoothly at the kit shell, however, built-in commands User's guide; reference manual first attempt. This shell's ability to open like fc and export have their own refer­ Price and. close files from within a script made ence·pages and little or no mention (ex­ $350 programming easier. While the syntax cept to "see also") on the shell page it­ took some getting used to, this capability self. This forces the reader to jump allowed the entire mail system to fit into .around the document, when all the shell­ a single script. related information should have been can modify a range of commands and The C Shell was only a little niore dif­ presented under sh, the command used then reexecute them in modified form. ficult to manage, lacking the ability to to invoke the MKS Toolkit shell. This open and close files on the fly. It is, how­ scattering also hampers application de­ Shell Programming ever, robust in its own right, and al­ velopment and seems to be a throwback In addition to their regular duties as though the "list headers" function had to to DOS and OS/2 manuals. Users of command-launching platforms, these be split into a separate script, control these environments might enjoy MKS shells are potent, capable, interpreted passed to and from it quickly and unno­ Toolkit's layout. languages. Aside from original pro­ ticeably. The MKS Toolkit user's guide is bet­ grams, several scripts in the public do­ There was no significant difference in ter. The most complex of the MKS Tool­ main serve a variety of useful functions. speed. Both shells hesitated for a bit be­ kit's commands are covered by tutorials However, since the C Shell and MKS' fore executing while they cached the in this manual, and they are reasonably Toolkit shell are both native to Unix, function definitions, but once the func­ good. The coverage is limited, and you most available scripts would expect to tions began running, performance was shouldn't expect to be introduced to all, make use of Unix features and com­ satisfactory. or even most, of a command's features. mands not available under OS/2. The The effort required to pull together Upon finishing the tutorial, you'll have a MKS Toolkit, which includes nearly all working scripts was minimal: The MKS good feel for the command. the most widely used Unix commands, is Toolkit shell version took about 2 hours better suited to adapting existing scripts; to produce, and the C Shell took a bit Worthwhile Shells most of them should run with few modi­ longer. The MKS Toolkit shell script I consider very few products, as a class, fications. was only slightly smaller at 150 lines, indispensable. These shells fit comfort­ The C Shell, however, because of its compared to the C Shell's 187 lines.
Recommended publications
  • Shell Scripting with Bash
    Introduction to Shell Scripting with Bash Charles Jahnke Research Computing Services Information Services & Technology Topics for Today ● Introductions ● Basic Terminology ● How to get help ● Command-line vs. Scripting ● Variables ● Handling Arguments ● Standard I/O, Pipes, and Redirection ● Control Structures (loops and If statements) ● SCC Job Submission Example Research Computing Services Research Computing Services (RCS) A group within Information Services & Technology at Boston University provides computing, storage, and visualization resources and services to support research that has specialized or highly intensive computation, storage, bandwidth, or graphics requirements. Three Primary Services: ● Research Computation ● Research Visualization ● Research Consulting and Training Breadth of Research on the Shared Computing Cluster (SCC) Me ● Research Facilitator and Administrator ● Background in biomedical engineering, bioinformatics, and IT systems ● Offices on both CRC and BUMC ○ Most of our staff on the Charles River Campus, some dedicated to BUMC ● Contact: [email protected] You ● Who has experience programming? ● Using Linux? ● Using the Shared Computing Cluster (SCC)? Basic Terminology The Command-line The line on which commands are typed and passed to the shell. Username Hostname Current Directory [username@scc1 ~]$ Prompt Command Line (input) The Shell ● The interface between the user and the operating system ● Program that interprets and executes input ● Provides: ○ Built-in commands ○ Programming control structures ○ Environment
    [Show full text]
  • UKUI: a Lightweight Desktop Environment Based on Pluggable
    2016 International Conference on Artificial Intelligence and Computer Science (AICS 2016) ISBN: 978-1-60595-411-0 UKUI: A Lightweight Desktop Environment Based on Pluggable Framework for Linux Distribution Jie YU1, Lu SI1,*, Jun MA1, Lei LUO1, Xiao-dong LIU1, Ya-ting KUANG2, Huan PENG2, Rui LI1, Jin-zhu KONG2 and Qing-bo WU1 1College of Computer, National University of Defense Technology, Changsha, China 2Tianjin KYLIN Information Technology Co., Ltd, Tianjin, China *[email protected] *Corresponding author Keywords: Desktop environment, Ubuntu, User interface. Abstract. Ubuntu is an operating system with Linux kernel based on Debian and distributed as free and open-source software. It uses Unity as its default desktop environment, which results in more difficulties of usage for Microsoft Windows users. In this paper, we present a lightweight desktop environment named UKUI based on UbuntuKylin, the official Chinese version of Ubuntu, for Linux distribution. It is designed as a pluggable framework and provides better user experience during human-computer interaction. In order to evaluate the performance of UKUI, a set of testing bench suits were performed on a personal computer. Overall, the results showed that UKUI has better performance compared with Unity. Introduction Linux is a freely available operating system (OS) originated by Linux Torvalds and further developed by thousands of others. Typically, Linux is packaged in a form known as a Linux distribution for both desktop and server use. Some of the most popular mainstream Linux distributions are Red Hat [1], Ubuntu [2], Arch [3], openSUSY [4], Gentoo [5], etc. There are several desktop environments available for nowadays modern Linux distributions, such as XFCE [6], GNOME [7], KDE [8] and LXDE [9].
    [Show full text]
  • C Shell Scripts File Permissions a Simple Spelling Checker Command
    Cshell scripts Asimple spelling checker mylatex1.csh #!/bin/csh #!/bin/csh tr -cs "[:alpha:]" "[\n*]" < $1 \ latex file.tex |tr"[:upper:]" "[:lower:]" \ dvips -f file.dvi > file.ps |sort -u > tempfile rm file.aux file.dvi file.log comm -23 tempfile /usr/share/dict/words rm tempfile mylatex2.csh #!/bin/csh Put one word per line \ |convert everything to lowercase \ latex $1.tex |sor t the words,remove duplicates and write the result to ’tempfile’. dvips -f $1.dvi > $1.ps rm $1.aux $1.dvi $1.log Pr int those words in ’tempfile’ that are not in the dictionary. Remove the temporar y file. Graham Kemp,Chalmers University of Technology Graham Kemp,Chalmers University of Technology File permissions Command substitution in a script ls -l To include the output from one command within the command line for another command, enclose the command whose output is to be included rwxrwx rwx within ‘backquotes‘. For example: rwxr -xr -x #!/bin/csh 111101101 echo Date and time is: date echo 1111 011 012 = 7558 echo "Your username is:" ‘whoami‘ echo "Your current directory is:" ‘pwd‘ chmod 755 file.sh chmod u+x file.sh chmod -R a+rX . Graham Kemp,Chalmers University of Technology Graham Kemp,Chalmers University of Technology Editing several files at once (1) sed scripts Suppose wewant to change ‘‘cie’’to‘‘cei’’inall files in the current grep href publications.html \ director y whose name ends with ‘‘.tex’’. |sed ’s/[ˆ"]*"//’ \ |sed ’s/".*//’ #!/bin/csh Instead of giving a single editing command on the command line,wecan ls *.tex | sed ’s/.*/sed s\/cie\/cei\/g & > &tmp/’ > s1 create a script file containing a sequence of editing commands.
    [Show full text]
  • Shell Script & Advance Features of Shell Programming
    Kirti Kaushik et al, International Journal of Computer Science and Mobile Computing, Vol.4 Issue.4, April- 2015, pg. 458-462 Available Online at www.ijcsmc.com International Journal of Computer Science and Mobile Computing A Monthly Journal of Computer Science and Information Technology ISSN 2320–088X IJCSMC, Vol. 4, Issue. 4, April 2015, pg.458 – 462 RESEARCH ARTICLE Shell Script & Advance Features of Shell Programming Kirti Kaushik* Roll No.15903, CS, Department of Computer science, Dronacharya College of Engineering, Gurgaon-123506, India Email: [email protected] Jyoti Yadav Roll No. 15040, CS, Department of Applied Computer science, Dronacharya College of Engineering, Gurgaon-123506, India Email: [email protected] Kriti Bhatia Roll No. 15048, CS, Department of Applied Computer science, Dronacharya College of Engineering, Gurgaon-123506, India Email: [email protected] Abstract-- In this research paper, the idea of shell scripting and writing computer programs is examined and different parts of shell programming are likewise contemplated. A shell script is a PC system intended to be controlled by the UNIX shell which is a charge line translator. The different tongues of shell scripts are thought to be scripting dialects. Regular operations performed by shell scripts incorporate document control, program execution, and printing content. A shell script can give an advantageous variety ofa framework order where unique environment settings, charge alternatives, or post-transforming apply naturally, yet in a manner that permits the new script to still go about as a completely typical UNIX summon. The real ideas like Programming in the Borne and C-shell, in which it would be clarified that how shell programming could be possible in Borne and C-shell.
    [Show full text]
  • Openvms: an Introduction
    The Operating System Handbook or, Fake Your Way Through Minis and Mainframes by Bob DuCharme VMS Table of Contents Chapter 7 OpenVMS: An Introduction.............................................................................. 7.1 History..........................................................................................................................2 7.1.1 Today........................................................................................................................3 7.1.1.1 Popular VMS Software..........................................................................................4 7.1.2 VMS, DCL................................................................................................................4 Chapter 8 Getting Started with OpenVMS........................................................................ 8.1 Starting Up...................................................................................................................7 8.1.1 Finishing Your VMS Session...................................................................................7 8.1.1.1 Reconnecting..........................................................................................................7 8.1.2 Entering Commands..................................................................................................8 8.1.2.1 Retrieving Previous Commands............................................................................9 8.1.2.2 Aborting Screen Output.........................................................................................9
    [Show full text]
  • Openvms Security
    OpenVMS Security Presented by Paul Williams PARSEC Group 999 18th Street, Suite 1725 Denver, CO 80202 www.parsec.com | 888-4-PARSEC To Download this Presentation, please visit: http://www.parsec.com/public/openvmssecurity.pdf To E-mail Paul [email protected] www.parsec.com | 888-4-PARSEC Outline • OpenVMS Security Design • Physical Security • Object Security • UIC/ACL Security • User Access • Break-in Detection • Network and Internet Considerations • Encrypted Network Communication • Kerberos • Secure Socket Layer (SSL) Goals • Discuss the important points and consideration of OpenVMS Security • Concentrate on the mechanics and mechanisms of OpenVMS features. • Show how OpenVMS is one of the most secure operating systems on the market. OpenVMS Security Design • Security was designed into OpenVMS since V1.0 • Many different levels of security in OpenVMS Physical Security Object Security User Management Network Security • Has never had a virus Physical Security • System • System Console • Storage devices and media System Disk Data and Database Volumes Backups • Network devices and media Physical Security: System • Increase system reliability through restricted access Prevent intentional tampering and outage Prevent outage due to accidents • Prevent Front Panel Access Halts Reset/initializations Power switch/source Power on action settings (VAX) switch Physical Security: Console • Can be a big security hole for OpenVMS Anyone with physical access to the console can break into OpenVMS buy getting into the SYSBOOT utility. Then OpenVMS can be broken into: Buy redirecting startup Buy changing system parameters Physical Security: Getting to SYSBOOT on the Integrity Console Example • On the Integrity shutdown to the EFI Boot Manager and select the EFI Shell and create a alias.
    [Show full text]
  • What Is the Shell? • the Login Shell
    03 0672324903 Ch03 2/3/03 1:41 PM Page 41 3 IN THIS CHAPTER • The Kernel and the Utilities What Is the Shell? • The Login Shell • Typing Commands to the Shell In this chapter you’ll learn what the shell is and what it does. • The Shell’s Responsibilities The Kernel and the Utilities The Unix system is itself logically divided into two pieces: the kernel and the utilities (see Figure 3.1). Unix system Utilities kernel disks Memory FIGURE 3.1 The Unix system. The kernel is the heart of the Unix system and resides in the computer’s memory from the time the computer is turned on and booted until the time it is shut down. The utilities, on the other hand, reside on the computer’s disk and are only brought into memory as requested. Virtually every command you know under the Unix system is classified as a utility; therefore, the program resides on the disk and is brought into memory only when you request that the command be executed. So, for example, when you execute the date command, the Unix system loads the program called date from the computer’s disk into memory and initiates its execution. The shell, too, is a utility program. It is loaded into memory for execution whenever you log in to the system. 03 0672324903 Ch03 2/3/03 1:41 PM Page 42 42 CHAPTER 3 What Is the Shell? In fact, it’s worth learning the precise sequence of events that occurs when the first shell on a terminal or window starts up.
    [Show full text]
  • Examining the Hamilton C Shell
    EXAMINING ROO M Examining the Hamilton C Shell Unix power for OS/2 Scott Richman tarting OS/2 for the first time was, file system), long filenames, and threads. in the background and the server will for me, like unlocking a Ferarri, Additionally, the Shell supports large be kept busy. sitting behind its wheel and find­ command lines and pipes (up to 64K) ing a Yugo's dash. What a disap­ and includes faster and more powerful Supporting Procedures pointment. Sure, the engine and utilities than those supplied with OS/2. Script programmers can create C Shell suspensionS were first rate, but the con­ This is more than Unix - this is a pow­ procedures, which are more like func­ trols were minimal, the clutch was stiff, erful requirement for development un­ tions: They accept a parameter list and and the pedals were nonresponsive! der OS/2. The ability to execute C shells return a value. These procedures are OS/2 comes with great stuff, but CMD simultaneously in different Presenta­ compiled into C Shell memory and are .EXE, the default command-line pro­ tion Manager (PM) text windows con­ then executed as new shell commands. cessor, is poor compared to the pow­ verts your PC into a flexible workstation. Procedures can greatly extend the erfuloperating system beneath. CMD.EXE The Hamilton C Shell comes with power and flexibility of your environ­ appears to be a port of the MS-DOS many programs and shell scripts. To ment. COMMAND.COM and lacks the major install the Shell, you simply copy the As an example, consider ZCW.CSH features of a serious front end.
    [Show full text]
  • Mac OS X: an Introduction for Support Providers
    Mac OS X: An Introduction for Support Providers Course Information Purpose of Course Mac OS X is the next-generation Macintosh operating system, utilizing a highly robust UNIX core with a brand new simplified user experience. It is the first successful attempt to provide a fully-functional graphical user experience in such an implementation without requiring the user to know or understand UNIX. This course is designed to provide a theoretical foundation for support providers seeking to provide user support for Mac OS X. It assumes the student has performed this role for Mac OS 9, and seeks to ground the student in Mac OS X using Mac OS 9 terms and concepts. Author: Robert Dorsett, manager, AppleCare Product Training & Readiness. Module Length: 2 hours Audience: Phone support, Apple Solutions Experts, Service Providers. Prerequisites: Experience supporting Mac OS 9 Course map: Operating Systems 101 Mac OS 9 and Cooperative Multitasking Mac OS X: Pre-emptive Multitasking and Protected Memory. Mac OS X: Symmetric Multiprocessing Components of Mac OS X The Layered Approach Darwin Core Services Graphics Services Application Environments Aqua Useful Mac OS X Jargon Bundles Frameworks Umbrella Frameworks Mac OS X Installation Initialization Options Installation Options Version 1.0 Copyright © 2001 by Apple Computer, Inc. All Rights Reserved. 1 Startup Keys Mac OS X Setup Assistant Mac OS 9 and Classic Standard Directory Names Quick Answers: Where do my __________ go? More Directory Names A Word on Paths Security UNIX and security Multiple user implementation Root Old Stuff in New Terms INITs in Mac OS X Fonts FKEYs Printing from Mac OS X Disk First Aid and Drive Setup Startup Items Mac OS 9 Control Panels and Functionality mapped to Mac OS X New Stuff to Check Out Review Questions Review Answers Further Reading Change history: 3/19/01: Removed comment about UFS volumes not being selectable by Startup Disk.
    [Show full text]
  • MS-DOS Basics.Pdf
    MS-DOS Basics The Command Prompt When you first turn on your computer, you will see some cryptic information flash by. MS-DOS displays this information to let you know how it is configuring your computer. You can ignore it for now. When the information stops scrolling past, you'll see the following: C:\> This is called the command prompt or DOS prompt. The flashing underscore next to the command prompt is called the cursor. The cursor shows where the command you type will appear. Type the following command at the command prompt: ver The following message appears on your screen: MS-DOS version 6.22 Viewing the Contents of a Directory To view the contents of a directory 1. Type the following at the command prompt: dir A list similar to the following appears: Changing Directories To change from the root directory to the WINDOWS directory To change directories, you will use the cd command. The cd command stands for "change directory." 1. Type the following at the command prompt: cd windows The command prompt changes. It should now look like the following: C:\WINDOWS> Next, you will use the dir command to view a list of the files in the DOS directory. Viewing the Contents of WINDOWS Directory To view a list of the files in the WINDOWS directory 1. Type the following at the command prompt: dir Changing Back to the Root Directory To change to the root directory 1. Type the following at the command prompt: cd \ Note that the slash you type in this command is a backslash (\), not a forward slash (/).
    [Show full text]
  • Bash Guide for Beginners
    Bash Guide for Beginners Machtelt Garrels Garrels BVBA <tille wants no spam _at_ garrels dot be> Version 1.11 Last updated 20081227 Edition Bash Guide for Beginners Table of Contents Introduction.........................................................................................................................................................1 1. Why this guide?...................................................................................................................................1 2. Who should read this book?.................................................................................................................1 3. New versions, translations and availability.........................................................................................2 4. Revision History..................................................................................................................................2 5. Contributions.......................................................................................................................................3 6. Feedback..............................................................................................................................................3 7. Copyright information.........................................................................................................................3 8. What do you need?...............................................................................................................................4 9. Conventions used in this
    [Show full text]
  • MS-DOS Lecture
    MS-DOS 2017 University of Babylon College of Engineering Electrical Department Learning Basics of MS-DOS Assis. Lec. Abeer Abd Alhameed | 1 MS-DOS 2017 Outcomes: By the end of this lecture, students are able to: Define the MS-DOS system Log in MS-DOS commands system Display MS-DOS information on your computer Type basic commands of MS-DOS system (view directory contents, change directory, make directory) Assis. Lec. Abeer Abd Alhameed | 2 MS-DOS 2017 Learning of MS-DOS Basics: Definition - What does Microsoft Disk Operating System (MS- DOS) mean? The Microsoft Disk Operating System (MS-DOS) is an operating system developed for PCs (personal computers) with x86 microprocessors. It was the first widely-installed operating system in personal computers. It is a command-line-based system, where all commands are entered in text form and there is no graphical user interface. The Command Prompt: When you first turn on your computer, you will see some information flash by. MS-DOS displays this information to let you know how it is configuring your computer. You can ignore it for now. When the information stops scrolling past, you'll see the following: C:\> This is called the command prompt or DOS prompt. The flashing underscore next to the command prompt is called the cursor. The cursor shows where the command you type will appear. Typing a Command: This section explains how to type a command at the command prompt and demonstrates the "Bad command or file name" message. • To type a command at the command prompt 1. Type the following at the command prompt (you can type the command in either uppercase or lowercase letters): nul If you make a typing mistake, press the BACKSPACE key to erase the mistake, and then try again.
    [Show full text]