A Shell with Higher-Order Functions Paul Haahr ± Adobe Systems Incorporated Byron Rakitzis ± Network Appliance Corporation

Total Page:16

File Type:pdf, Size:1020Kb

A Shell with Higher-Order Functions Paul Haahr ± Adobe Systems Incorporated Byron Rakitzis ± Network Appliance Corporation Es: A shell with higher-order functions Paul Haahr ± Adobe Systems Incorporated Byron Rakitzis ± Network Appliance Corporation ABSTRACT In the fall of 1990, one of us (Rakitzis) re-implemented the Plan 9 command interpreter, rc, for use as a UNIX shell. Experience with that shell led us to wonder whether a more general approach to the design of shells was possible, and this paper describes the result of that experimentation. We applied concepts from modern functional programming languages, such as Scheme and ML, to shells, which typically are more concerned with UNIX features than language design. Our shell is both simple and highly programmable. By exposing many of the internals and adopting constructs from functional programming languages, we have created a shell which supports new paradigms for programmers. Although most users think of the shell as an At a super®cial level, es looks like most UNIX interactive command interpreter, it is really a pro- shells. The syntax for pipes, redirection, background gramming language in which each statement runs a jobs, etc., is unchanged from the Bourne shell. Es's command. Because it must satisfy both the interac- programming constructs are new, but reminiscent of tive and programming aspects of command execu- rc and Tcl[6]. tion, it is a strange language, shaped as much by Es is freely redistributable, and is available by history as by design. anonymous ftp from ftp.white.toronto.edu. Ð Brian Kernighan & Rob Pike [1] Using es Introduction Commands A shell is both a programming language and For simple commands, es resembles other the core of an interactive environment. The ancestor shells. For example, newline usually acts as a com- of most current shells is the 7th Edition Bourne mand terminator. These are familiar commands shell[2], which is characterized by simple semantics, which all work in es: a minimal set of interactive features, and syntax that is all too reminiscent of Algol. One recent shell, cd /tmp rc[3], substituted a cleaner syntax but kept most of rm Ex* the Bourne shell's attributes. However, most recent ps aux | grep '^byron' | developments in shells (e.g., csh, ksh, zsh) have awk '{print $2}' | xargs kill -9 focused on improving the interactive environment without changing the structure of the underlying For simple uses, es bears a close resemblance language ± shells have proven to be resistant to to rc. For this reason, the reader is referred to the innovation in programming languages. paper on rc for a discussion of quoting rules, redirection, and so on. (The examples shown here, While rc was an experiment in adding modern however, will try to aim for a lowest common syntax to Bourne shell semantics, es is an explora- denominator of shell syntax, so that an understanding tion of new semantics combined with rc-in¯uenced of rc is not a prerequisite for understanding this syntax: es has lexically scoped variables, ®rst-class paper.) functions, and an exception mechanism, which are concepts borrowed from modern programming Functions languages such as Scheme and ML[4, 5]. Es can be programmed through the use of shell functions. Here is a simple function to print the date In es, almost all standard shell constructs (e.g., in yy-mm-dd format: pipes and redirection) are translated into a uniform representation: function calls. The primitive func- fn d { tions which implement those constructs can be mani- date +%y-%m-%d pulated the same way as all other functions: invoked, } replaced, or passed as arguments to other functions. The ability to replace primitive functions in es is key Functions can also be called with arguments. to its extensibility; for example, a user can override Es allows parameters to be speci®ed to functions by the de®nition of pipes to cause remote execution, or placing them between the function name and the the path-searching machinery to implement a path open-brace. This function takes a command cmd and look-up cache. arguments args and applies the command to each argument in turn: 1993 Winter USENIX ± January 25-29, 1993 ± San Diego, CA 53 Es: A shell with higher-order functions Haahr & Rakitzis fn apply cmd args { command-line. This is called a lambda.2 It takes the for (i = $args) form $cmd $i @ parameters { commands } } 1 In effect, a lambda is a procedure ``waiting to For example: happen.'' For example, it is possible to type: es> apply echo testing 1.. 2.. 3.. es> @ i {cd $i; rm -f *} /tmp testing 1.. directly at the shell, and this runs the inlined func- 2.. tion directly on the argument /tmp. 3.. There is one more thing to notice: the inline Note that apply was called with more than two function that was supplied to apply had a parame- arguments; es assigns arguments to parameters one- ter named i, and the apply function itself used a to-one, and any leftovers are assigned to the last reference to a variable called i. Note that the two parameter. For example: uses did not con¯ict: that is because es function parameters are lexically scoped, much as variables es> fn rev3 a b c { are in C and Scheme. echo $c $b $a } Variables es> rev3 1 2 3 4 5 The similarity between shell functions and 3 4 5 2 1 lambdas is not accidental. In fact, function de®nitions are rewritten as assignments of lambdas If there are fewer arguments than parameters, es to shell variables. Thus these two es commands are leaves the leftover parameters null: entirely equivalent: es> rev3 1 fn echon args {echo -n $args} 1 fn-echon = @ args {echo -n $args} So far we have only seen simple strings passed In order not to con¯ict with regular variables, as arguments. However, es functions can also take function variables have the pre®x fn- prepended to program fragments (enclosed in braces) as argu- their names. This mechanism is also used at execu- ments. For example, the apply function de®ned tion time; when a name like apply is seen by es, it above can be used with program fragments typed ®rst looks in its symbol table for a variable by the directly on the command line: name fn-apply. Of course, it is always possible to es> apply @ i {cd $i; rm -f *} \ execute the contents of any variable by dereferencing /tmp /usr/tmp it explicitly with a dollar sign: es> silly-command = {echo hi} This command contains a lot to understand, so let us es> $silly-command break it up slowly. hi In any other shell, this command would usually be split up into two separate commands: The previous examples also show that variables can be set to contain program fragments as well as es> fn cd-rm i { simple strings. In fact, the two can be intermixed: cd $i rm -f * es> mixed = {ls} hello, {wc} world } es> echo $mixed(2) $mixed(4) es> apply cd-rm /tmp /usr/tmp hello, world es> $mixed(1) | $mixed(3) Therefore, the construct 61 61 478 @ i {cd $i; rm -f *} Variables can hold a list of commands, or even is just a way of inlining a function on the a list of lambdas. This makes variables into versatile tools. For example, a variable could be used as a function dispatch table. 1In our examples, we use ``es> '' as es's prompt. The default prompt, which may be overridden, is ``; '' which is interpreted by es as a null command followed by a 2The keyword @ introduces the lambda. Since @ is not a command separator. Thus, whole lines, including special character in es it must be surrounded by white prompts, can be cut and pasted back to the shell for re- space. @ is a poor substitute for the letter λ, but it was execution. In examples, an italic ®xed width font one of the few characters left on a standard keyboard indicates user input. which did not already have a special meaning. 54 1993 Winter USENIX ± January 25-29, 1993 ± San Diego, CA Haahr & Rakitzis Es: A shell with higher-order functions Binding es> trace echo-nl In the section on functions, we mentioned that es> echo-nl a b c function parameters are lexically scoped. It is also calling echo-nl a b c possible to use lexically-scoped variables directly. a For example, in order to avoid interfering with a glo- calling echo-nl b c bal instance of i, the following scoping syntax can b be used: calling echo-nl c c let (var = value) { calling echo-nl commands which use $var } The reader should note that Lexical binding is useful in shell functions, where it !cmd becomes important to have shell functions that do not clobber each others' variables. is es's ``not'' command, which inverts the sense of the return value of cmd, and Es code fragments, whether used as arguments to commands or stored in variables, capture the ~ subject pattern values of enclosing lexically scoped values. For matches subject against pattern and returns true if example, the subject is the same as the pattern. (In fact, the es> let (h=hello; w=world) { matching is a bit more sophisticated, for the pattern hi = { echo $h, $w } may include wildcards.) } Shells like the Bourne shell and rc support a es> $hi form of local assignment known as dynamic binding. hello, world The shell syntax for this is typically: One use of lexical binding is in rede®ning var=value command functions. A new de®nition can store the previous That notation con¯icts with es's syntax for assign- de®nition in a lexically scoped variable, so that it is ment (where zero or more words are assigned to a only available to the new function.
Recommended publications
  • Beginning Portable Shell Scripting from Novice to Professional
    Beginning Portable Shell Scripting From Novice to Professional Peter Seebach 10436fmfinal 1 10/23/08 10:40:24 PM Beginning Portable Shell Scripting: From Novice to Professional Copyright © 2008 by Peter Seebach All rights reserved. No part of this work may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or by any information storage or retrieval system, without the prior written permission of the copyright owner and the publisher. ISBN-13 (pbk): 978-1-4302-1043-6 ISBN-10 (pbk): 1-4302-1043-5 ISBN-13 (electronic): 978-1-4302-1044-3 ISBN-10 (electronic): 1-4302-1044-3 Printed and bound in the United States of America 9 8 7 6 5 4 3 2 1 Trademarked names may appear in this book. Rather than use a trademark symbol with every occurrence of a trademarked name, we use the names only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark. Lead Editor: Frank Pohlmann Technical Reviewer: Gary V. Vaughan Editorial Board: Clay Andres, Steve Anglin, Ewan Buckingham, Tony Campbell, Gary Cornell, Jonathan Gennick, Michelle Lowman, Matthew Moodie, Jeffrey Pepper, Frank Pohlmann, Ben Renow-Clarke, Dominic Shakeshaft, Matt Wade, Tom Welsh Project Manager: Richard Dal Porto Copy Editor: Kim Benbow Associate Production Director: Kari Brooks-Copony Production Editor: Katie Stence Compositor: Linda Weidemann, Wolf Creek Press Proofreader: Dan Shaw Indexer: Broccoli Information Management Cover Designer: Kurt Krames Manufacturing Director: Tom Debolski Distributed to the book trade worldwide by Springer-Verlag New York, Inc., 233 Spring Street, 6th Floor, New York, NY 10013.
    [Show full text]
  • SOAP / REST and IBM I
    1/11/18 SOPA / REST and IBM i Tim Rowe- [email protected] Business Architect Application Development © 2017 International Business Machines Corporation Using a REST API with Watson https://ibm-i-watson-test.mybluemix.net/ 2 © 2017 International Business Machines Corporation 1 1/11/18 ™ What is an API - Agenda •What is an API •What is a Web Service •SOAP vs REST – What is SOAP – What is REST – Benefits – Drawbacks 3 © 2017 International Business Machines Corporation ™ Connections Devices There Here Applications 4 © 2017 International Business Machines Corporation 2 1/11/18 ™ 5 © 2017 International Business Machines Corporation ™ 6 © 2017 International Business Machines Corporation 3 1/11/18 ™ 7 © 2017 International Business Machines Corporation ™ 8 © 2017 International Business Machines Corporation 4 1/11/18 ™ API Definition Application Programming Interface 9 © 2017 International Business Machines Corporation ™ API Definition 10 © 2017 International Business Machines Corporation 5 1/11/18 ™ APIs - Simple Simple way to connect endpoints. Send a request and receive a response. 11 © 2017 International Business Machines Corporation ™ Example Kitchen 12 © 2017 International Business Machines Corporation 6 1/11/18 ™ 13 © 2017 International Business Machines Corporation ™ Not just a buzz-word, but rather the evolution of services- oriented IT. Allows users, businesses & partners the ability to interact in new and different ways resulting in the growth (in some cases the revolution) of business. 14 © 2017 International Business Machines Corporation
    [Show full text]
  • Shell Variables
    Shell Using the command line Orna Agmon ladypine at vipe.technion.ac.il Haifux Shell – p. 1/55 TOC Various shells Customizing the shell getting help and information Combining simple and useful commands output redirection lists of commands job control environment variables Remote shell textual editors textual clients references Shell – p. 2/55 What is the shell? The shell is the wrapper around the system: a communication means between the user and the system The shell is the manner in which the user can interact with the system through the terminal. The shell is also a script interpreter. The simplest script is a bunch of shell commands. Shell scripts are used in order to boot the system. The user can also write and execute shell scripts. Shell – p. 3/55 Shell - which shell? There are several kinds of shells. For example, bash (Bourne Again Shell), csh, tcsh, zsh, ksh (Korn Shell). The most important shell is bash, since it is available on almost every free Unix system. The Linux system scripts use bash. The default shell for the user is set in the /etc/passwd file. Here is a line out of this file for example: dana:x:500:500:Dana,,,:/home/dana:/bin/bash This line means that user dana uses bash (located on the system at /bin/bash) as her default shell. Shell – p. 4/55 Starting to work in another shell If Dana wishes to temporarily use another shell, she can simply call this shell from the command line: [dana@granada ˜]$ bash dana@granada:˜$ #In bash now dana@granada:˜$ exit [dana@granada ˜]$ bash dana@granada:˜$ #In bash now, going to hit ctrl D dana@granada:˜$ exit [dana@granada ˜]$ #In original shell now Shell – p.
    [Show full text]
  • UNIX X Command Tips and Tricks David B
    SESUG Paper 122-2019 UNIX X Command Tips and Tricks David B. Horvath, MS, CCP ABSTRACT SAS® provides the ability to execute operating system level commands from within your SAS code – generically known as the “X Command”. This session explores the various commands, the advantages and disadvantages of each, and their alternatives. The focus is on UNIX/Linux but much of the same applies to Windows as well. Under SAS EG, any issued commands execute on the SAS engine, not necessarily on the PC. X %sysexec Call system Systask command Filename pipe &SYSRC Waitfor Alternatives will also be addressed – how to handle when NOXCMD is the default for your installation, saving results, and error checking. INTRODUCTION In this paper I will be covering some of the basics of the functionality within SAS that allows you to execute operating system commands from within your program. There are multiple ways you can do so – external to data steps, within data steps, and within macros. All of these, along with error checking, will be covered. RELEVANT OPTIONS Execution of any of the SAS System command execution commands depends on one option's setting: XCMD Enables the X command in SAS. Which can only be set at startup: options xcmd; ____ 30 WARNING 30-12: SAS option XCMD is valid only at startup of the SAS System. The SAS option is ignored. Unfortunately, ff NOXCMD is set at startup time, you're out of luck. Sorry! You might want to have a conversation with your system administrators to determine why and if you can get it changed.
    [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]
  • Configuring Your Login Session
    SSCC Pub.# 7-9 Last revised: 5/18/99 Configuring Your Login Session When you log into UNIX, you are running a program called a shell. The shell is the program that provides you with the prompt and that submits to the computer commands that you type on the command line. This shell is highly configurable. It has already been partially configured for you, but it is possible to change the way that the shell runs. Many shells run under UNIX. The shell that SSCC users use by default is called the tcsh, pronounced "Tee-Cee-shell", or more simply, the C shell. The C shell can be configured using three files called .login, .cshrc, and .logout, which reside in your home directory. Also, many other programs can be configured using the C shell's configuration files. Below are sample configuration files for the C shell and explanations of the commands contained within these files. As you find commands that you would like to include in your configuration files, use an editor (such as EMACS or nuTPU) to add the lines to your own configuration files. Since the first character of configuration files is a dot ("."), the files are called "dot files". They are also called "hidden files" because you cannot see them when you type the ls command. They can only be listed when using the -a option with the ls command. Other commands may have their own setup files. These files almost always begin with a dot and often end with the letters "rc", which stands for "run commands".
    [Show full text]
  • Rc the Plan 9 Shell
    Rc ߞ The Plan 9 Shell Tom Duff [email protected]−labs.com ABSTRACT Rc is a command interpreter for Plan 9 that provides similar facilities to UNIXߣs Bourne shell, with some small additions and less idiosyncratic syntax. This paper uses numerous examples to describe rcߣs features, and contrasts rc with the Bourne shell, a model that many readers will be familiar with. 1. Introduction Rc is similar in spirit but different in detail from UNIXߣs Bourne shell. This paper describes rcߣs principal features with many small examples and a few larger ones. It assumes familiarity with the Bourne shell. 2. Simple commands For the simplest uses rc has syntax familiar to Bourne-shell users. All of the fol­ lowing behave as expected: date cat /lib/news/build who >user.names who >>user.names wc <file echo [a−f]*.c who | wc who; date vc *.c & mk && v.out /*/bin/fb/* rm −r junk || echo rm failed! 3. Quotation An argument that contains a space or one of rcߣs other syntax characters must be enclosed in apostrophes (’): rm ’odd file name’ An apostrophe in a quoted argument must be doubled: echo ’How’’s your father?’ 4. Patterns An unquoted argument that contains any of the characters *?[is a pattern to be matched against file names. A * character matches any sequence of characters, ? matches any single character, and [class] matches any character in the class, unless the first character of class is ~, in which case the class is complemented. The class may ­ 2 ­ also contain pairs of characters separated by −, standing for all characters lexically between the two.
    [Show full text]
  • Shell Scripting, Globs, and Ranges
    SHELL SCRIPTING AND CUSTOMIZATION GPI F20 · Emmanuel & Sayan PET TAX Carole Bashkin! Ran her program, bashed it Can’t convince her that bash isn’t awesome Pipin’, globbin’, multitaskin’ What’s happen? Carole Bashkin! WHAT IS A SHELL? ● A shell is the outermost layer that allows a user to interact with the operating system. ● For a programmer, it is the program that powers your terminal. ● We will focus on Unix shells, command-line interpreters for Unix-like operating systems. ● They come in many flavors. ○ zsh, bash, fish, etc. COMMAND CENTER ● Show contents of a file cat path ● Show contents of a directory ls ● Change directories cd path ● Remove a file rm src ● Move/rename a file mv src dst ● Copy a file cp src new_name ● Execute a binary ./name ● Print something echo “Hello, world!” OVER, OVER, AND OVER AGAIN ● Sometimes, you want to run the same set of commands multiple times. ○ Compiling and testing your code ○ Renaming a bunch of files ○ Initializing your git repos with a .gitignore ○ Archiving your new favorite xkcd comics ○ Setting up your dev environment on a new machine ● Shell scripts allow you to run a sequence of shell commands from a file. WRITE YOUR OWN SHELL SCRIPT ● Each script begins with a shebang followed by the commands you want to execute. ○ #!/bin/zsh ○ #!/bin/bash ○ #!/usr/bin/env python3 ● Add executable permissions to your file. ○ chmod +x script.sh ○ This changes the mode of the file to an executable. ● Run the script! ○ ./script.sh FUNCTIONS ARE SHELL SCRIPTS ● Apart from interfacing with the operating system, they support other programming constructs as well.
    [Show full text]
  • An Introduction to the C Shell
    -- -- An Introduction to the C shell William Joy (revised for 4.3BSD by Mark Seiden) Computer Science Division Department of Electrical Engineering and Computer Science University of California, Berkeley Berkeley, California 94720 ABSTRACT Csh is a newcommand language interpreter for UNIX†systems. It incorporates good features of other shells and a history mechanism similar to the redo of INTERLISP. While incorporating manyfeatures of other shells which makewriting shell programs (shell scripts) easier,most of the features unique to csh are designed more for the interac- tive UNIX user. UNIX users who have read a general introduction to the system will find a valuable basic explanation of the shell here. Simple terminal interaction with csh is possible after reading just the first section of this document. The second section describes the shell’s capabilities which you can explore after you have begun to become acquainted with the shell. Later sections introduce features which are useful, but not necessary for all users of the shell. Additional information includes an appendix listing special characters of the shell and a glossary of terms and commands introduced in this manual. Introduction A shell is a command language interpreter. Csh is the name of one particular command interpreter on UNIX.The primary purpose of csh is to translate command lines typed at a terminal into system actions, such as invocation of other programs. Csh is a user program just likeany you might write. Hopefully, csh will be a very useful program for you in interacting with the UNIX system. In addition to this document, you will want to refer to a copyofthe UNIX User Reference Manual.
    [Show full text]
  • Monitoring Malicious Powershell Usage Through Log Analysis
    Monitoring malicious PowerShell usage through log analysis Jesper Magnusson Computer Science and Engineering, master's level 2019 Luleå University of Technology Department of Computer Science, Electrical and Space Engineering (This page is intentionally left almost blank) Abstract Security has become a hot topic around the world but focuses more on the perime- ter than inside networks which opens up vulnerabilities. Directed cyber-attacks towards the energy sector which leverages this fact has increased and can have dis- astrous effect, even on national level. To counter this, a solution to monitor the usage of the most powerful and popular built-in tool among attackers - PowerShell - was implemented. A test-bed was set up reflecting a corporate network with two separate active directory domains, one for office clients and one for critical infrastructure. It was shown that attackers only needed to overtake the office active directory domain in order for gain easy access to the critical active directory domain. To simulate attacks of this type, a collection of malicious scripts was gathered from which a number of possible scenarios for taking over the office active directory domain via PowerShell was created. Windows has several options for logging executions of PowerShell commands on machines. The one used and deemed most beneficiary was "Module logging" with the addition of a filtered result of process creation logs. To monitor the logs created on the office client from PowerShell executions, a system based on the "ELK stack" was set up. This system gathered, processed, stored and visualized logs along with the result of their analysis. The system analyzed logs with the aid of a custom software called "ESPSA" which based on different parameters and contexts assigned every execution with a risk value indicating the level of maliciousness.
    [Show full text]
  • Tivoli Storage Manager Using the Application Program Interface
    Tivoli Storage Manager Using the Application Program Interface Version 5 Release 1 GC32-0793-00 Tivoli Storage Manager Using the Application Program Interface Version 5 Release 1 GC32-0793-00 Note Before using this information and the product it supports, read the general information in “Appendix F. Notices” on page 237. First Edition (March 2002) This edition applies to version 5, release 1, modification 0 of the Tivoli Storage Manager Using the Application Program Interface (5698-SPM) and to all subsequent releases and modifications until otherwise indicated in new editions. This edition replaces SH26–4123–01. © Copyright International Business Machines Corporation 1993, 2002. All rights reserved. US Government Users Restricted Rights – Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. Contents Figures ...............v Accessing Across Nodes and Across Owners . 25 Managing Filespaces ...........26 Tables ...............vii Associating a Management Class With Objects. 28 Query Management Classes ........29 Querying the TSM System .........30 About This Book...........ix An Example .............32 Who Should Read This Manual ........ix Sending Data to a Server ..........34 Conventions Used in This Manual .......ix The Transaction Model .........34 Reading Syntax Diagrams ..........x File Aggregation............34 Related Information ...........xii Sending Objects to the Server ........35 Accessing Publications Online .......xii Understand Backup And Archive Objects . 35 How to Contact Us ...........xiii Compression .............36 Summary of Code Changes .........xiv Reading State Diagrams and Flowcharts .....36 Version 5 Release 1 Level 0 March 2002....xiv An Example .............39 Version 4 Release 2 Level 1 November 2001 . xv File Grouping .............41 Version 4 Release 2 Level 0 June 2001 ....xv Receiving Data from a Server ........43 Version 4 Release 1 Level 0 July 2000 ....xvi Perform a Partial Object Restore or Retrieve .
    [Show full text]
  • Lmod Documentation Release 8.5.16
    Lmod Documentation Release 8.5.16 Robert McLay Sep 24, 2021 Contents 1 PURPOSE 1 2 OVERVIEW 3 3 Lmod Web Sites 5 4 Introduction to Lmod 7 5 Installing Lmod 27 6 Advanced Topics 55 7 Topics yet to be written 119 8 Indices and tables 121 i ii CHAPTER 1 PURPOSE Lmod is a Lua based module system that easily handles the MODULEPATH Hierarchical problem. Environment Modules provide a convenient way to dynamically change the users’ environment through modulefiles. This includes easily adding or removing directories to the PATH environment variable. Modulefiles for Library packages provide environment variables that specify where the library and header files can be found. 1 Lmod Documentation, Release 8.5.16 2 Chapter 1. PURPOSE CHAPTER 2 OVERVIEW This guide is written to explain what Environment Modules are and why they are very useful for both users and system administrators. Lmod is an implementation of Environment Modules, much of what is said here is true for any environment modules system but there are many features which are unique to Lmod. Environment Modules provide a convenient way to dynamically change the users’ environment through modulefiles. This includes easily adding or removing directories to the PATH environment variable. A modulefile contains the necessary information to allow a user to run a particular application or provide access to a particular library. All of this can be done dynamically without logging out and back in. Modulefiles for applications modify the user’s path to make access easy. Modulefiles for Library packages provide environment variables that specify where the library and header files can be found.
    [Show full text]