Computing Methods in High Energy Physics

Total Page:16

File Type:pdf, Size:1020Kb

Computing Methods in High Energy Physics COMPUTING METHODS IN HIGH ENERGY PHYSICS S. Lehti and V.Karim¨aki Helsinki Institute of Physics Spring 2010 Lecture 1 Spring 2010 COMPUTING METHODS IN HIGH ENERGY PHYSICS (page 1) S. Lehti and V.Karim¨aki Lecture 1 Outline: Practical 'hands-on' course for comput- • Short review to Unix basics,latex,makefile,cvs ing in high energy physics. • FORTRAN Credits: 5op (3ov), 13 lectures + 6 ex- • C++ ercises + home exam. Exercises split in two to have 12 x 1h exercises. • ROOT Recommended prerequisites: Introduc- • Combining programming languages tion to particle physics and programming • Cross section and branching ratio calculations skills. • Event generators Literature: Recommending an advanced • Detector simulation and reconstruction C++ book for reference. • Fast simulations • Grid computing Spring 2010 COMPUTING METHODS IN HIGH ENERGY PHYSICS (page 2) S. Lehti and V.Karim¨aki Lecture 1 Short review to Unix basics Unix Shells completion of each stage. The Shell is a program that runs automatically when you log in to a Unix/linux system. The Shell Name History Shell forms the interface between users and the sh (Bourne) The original shell rest of the system. It reads each command you csh,tcsh,zsh The C shell. Bourne Again Shell, from the type at your terminal and interprets what you bash have asked for. The Shell is very much like a GNU project rc More C than csh, also from GNU programming language with features like • variables • control structures (if,while,..) • subroutines File Handling • parameter passing Most Unix commands take input from the terminal • interrupt handling keyboard and send output to the terminal monitor. These features provide you with the capability to To redirect the output use > symbol: design your own tools. Shell scripting is ideal for $ ls > myfiles any small utilities that perform relatively simple Likewise you can redirect the input with the < sym- task, where efficiency is less important than easy bol: configuration, maintenance and portability. You $ wc -l < myfiles can use the shell to organize process control, so The need for redirection becomes more apparent in commands run in predetermined sequence, de- shell programming. pendent on the successful Spring 2010 COMPUTING METHODS IN HIGH ENERGY PHYSICS (page 3) S. Lehti and V.Karim¨aki Lecture 1 Short review to Unix basics Shell Programming Pipes Suppose you have a file called 'test' which contains The standard output of one process (or program) unix commands. There are different ways to get can be the standard input of another process. the system to execute those commands. One is When this is done a "pipeline" is formed. The giving the filename as an argument to the shell pipe operator is the j symbol. Examples: command, or one can use the command source in $ ls | sort which case the current shell is used $ ls | sort | more $ csh test (or sh test) $ ls | sort | grep btag | more $ source test Here the standard output from left becomes the One can also give the executing rights to the file standard input to the right of j. and then run it Pipelines provide a flexible and powerful mech- $ chmod 755 test anism for doing jobs easily and quickly, without $ test the need to construct special purpose tools. Ex- Here the number coding in the chmod command isting tools can be combined. Another useful comes from rwxrwxrwx with rwx being binary num- command: ber: rwx=111=7 and r-x=101=5. You can check $ find . -name "*.cpp" | xargs the rights of your files with the -l option of the ls grep btag command. This is searching every file in this directory and A shell script starts usually with a line which tells any subdirectory with ending cpp and containing which program is used to execute the file. The line the string btag. looks like this (for bourne shell) #!/bin/sh Spring 2010 COMPUTING METHODS IN HIGH ENERGY PHYSICS (page 4) S. Lehti and V.Karim¨aki Lecture 1 Short review to Unix basics Comments start with a # and continue to the • set end of a line. The shell syntax depends on which • set name shell is in use. At CERN people have been us- • set name = word ing widely csh (tcsh), but also bash as the linux • set name = (wordlist) default has gained ground. It's up to you which • set name[index] = word shell you prefer. The first three forms are used with scalar variables, whereas the last two are used with array variables. csh The setenv command is used to create new environ- Variables are used to hold temporary values and ment variables. Environment variables are passed manage changeable information. There are two to shell scripts and invoked commands, which can types of variables: reference the variables without first defining them. • Shell variables • setenv • Environment variables • setenv name value Shell variables are defined locally in the shell, To obtain the value of a variable a reference whereas environment variables are defined for $fnameg is used. Example the shell and all the child processes that are mv a.out analysis $fCHANNELg $RUN.out started from it. Here the variables CHANNEL and RUN contains The set command is used to create new local some values. A reference $f#nameg returns the variables and assign a value to them. Some dif- number of elements in array, and $f?nameg returns ferent methods of invoking the set command are 1 if the variable is set, 0 otherwise. as follows: Spring 2010 COMPUTING METHODS IN HIGH ENERGY PHYSICS (page 5) S. Lehti and V.Karim¨aki Lecture 1 Short review to Unix basics In addition to ordinary variables, a set of special An example csh script variables is available. #!/bin/csh if( ! $f?ENVIRONMENTg ) setenv ENVIRONMENT INTERACTIVE if( $ENVIRONMENT != "BATCH" ) then Variable Description if( ! $f?SCRATCHg ) then echo Setting workdir to HOME $0 Shorthand for $argv[0] setenv WORKDIR $HOME else $1,$2,...,$9 Shorthand for $argv[n] echo Setting workdir to SCRATCH setenv WORKDIR $SCRATCH $* Equivalent to $argv[*] endif setenv LS SUBCWD $PWD $$ Process number of the shell endif $< input from file #################################### setenv INPUTFILE analysis.in #setenv DATAPATH $LS SUBCWD/data setenv DATAPATH /mnt/data/data Conditional statements are created with #################################### if( expression ) then make else cd $WORKDIR if( -f $INPUTFILE ) rm $INPUTFILE endif cp -f $LS SUBCWD/$INPUTFILE $WORKDIR setenv LD LIBRARY PATH $LS SUBCWD/../lib:$fLD LIBRARY PATHg echo and loops with echo START EXECUTION OF JOB echo foreach name (wordlist) $LS SUBCWD/../bin/$fCHANNELg analysis.exe >& analysis.out if( -f $WORKDIR/analysis.out ) mv $WORKDIR/analysis.out $LS SUBCWD end echo echo JOB FINISHED while ( expression ) echo end exit Spring 2010 COMPUTING METHODS IN HIGH ENERGY PHYSICS (page 6) S. Lehti and V.Karim¨aki Lecture 1 Short review to Unix basics bash test expression In bash the standard sh assignment to set vari- [expression] ables is used The other form of flow control is the case-esac name = value block. Bash supports several types of loops: for, The array variables can be set in two ways, either while, until and select loops. All loops in bash can by setting a single element be exit by giving the built-in break command. name[index] = value or multiple elements at once Perl name = (value1; ::; valueN) Perl has become the language of choice for many Exporting variables for use in the environment Unix-based programs, including server support for export name WWW pages. Perl is a simple yet useful program- export name = value ming language that provides the convenience of Arithmetic evaluation is performed when the fol- shell scripts and the power and flexibility of high- lowing form is encountered: $(( expression )). level programming languages. In perl the variable The basic if statement syntax is can be a string, integer or floating-point number. if list ; then All scalar variables start with the dollar sign $. The else following assignments are all legal in perl: fi $variable = 1; Most often the list given to an if statement is one $variable = "my string"; or more test commands, which can be invoked $variable = 3.14; by calling the test as follows: Spring 2010 COMPUTING METHODS IN HIGH ENERGY PHYSICS (page 7) S. Lehti and V.Karim¨aki Lecture 1 Short review to Unix basics To do arithmetic in Perl, the following operators An example Perl script #!/usr/local/bin/perl are supported: + - * / ** %. Logical operators ############################################### are divided into two classes, numeric and string. $ibg = 2020; $eventsPerFile = 500; The numeric logical operators are <, >, ==, $allEvents = 100000; <=, >=, !=, jj, && and !. The logical operator $firstEvent = 1; $BatchQueue = "1nw"; that work with strings are lt, gt, eq, le, ge and $Jobfile = ”offlineAnalysis.job”; ne. The most common assignment operator is $runNumber = 1; =. Autoincrement ++ and decrement - - are ############################################### $pwd = $ENVf'PWD'g; also available. Strings can be combined with . $orca = rindex("$pwd","ORCA"); $slash = index("$pwd","/",$orca); and .= operators, for example $ORCA Version = substr("$pwd",$orca,$slash-$orca); $famos = rindex("$pwd","FAMOS"); $a = "be" . "witched"; $slash = index("$pwd","/",$famos); $a = "be"; $a .= "witched"; $FAMOS Version = substr("$pwd",$famos,$slash-$famos); $ORCA VERSION = $ORCA Version; The if conditional statement has the following if($famos > $orca) f $ORCA VERSION = $FAMOS Version; structure: if (expr) f..g. Repeating statement g can be made using while and until, looping can print "Submitting $ORCA VERSION job(s)nn"; be done with the for statement. ###############################################
Recommended publications
  • Bash Shell Scripts
    Bash Shell Scripts Writing Bash shell scripts Bash shell scripts are text files Text files most efficiently built with programming editors (emacs or vi) File must be executable and in search path chmod 700 my_script PATH environment variable may not include .! An example shell script: #!/bin/bash #My first script echo "Hello World!" Bash Shell Scripts Writing Bash shell scripts Compile a Verilog file with vlog #!/bin/bash if [ ! d work ] ; then echo work does not exist, making it vlib work fi if [ ! s adder.v ] ; then vlog adder.v fi work directory must exist before compilation Get scripts via wget, eg: wget http://web.engr.oregonstate.edu/~traylor/ece474/script --- Bash Shell Scripts Writing Bash shell scripts File attribute checking #!/bin/bash if [ ! s junk_dir ] ; then mkdir junk_dir fi Spaces around brackets are needed! File attribute checking d exists and is a directory e, a file exists f exists and is a regular file s file exists and is not empty --- Bash Shell Scripts Writing Bash shell scripts Compile Verilog then run a simultion #!/bin/bash if [ ! -d "work" ] ; then vlib work fi if [ -s "adder.v" ] ; then vlog adder.v #runs simulation with a do file and no GUI vsim adder -do do.do quiet c else echo verilog file missing fi --- Bash Shell Scripts Writing Bash shell scripts vsim command and arguments vsim entity_name do dofile.do quiet -c -quiet (do not report loading file messages) -c (console mode, no GUI) -do (run vsim from a TCL do file) +nowarnTFMPC (don’t warn about mismatched ports, scary) +nowarnTSCALE (don’t warn about timing mismatches) Try vsim help for command line arguements --- Bash Shell Scripts Writing Bash Shell Scripts (TCL Script) In another text file, we create a TCL script with commands for the simulator.
    [Show full text]
  • Tcl/Tk for Xspecta Michael Flynn Tcl: Tcl (Ie Tool Command Language)
    Tcl/Tk for XSPECTa Michael Flynn Tcl: Tcl (i.e. Tool Command Language) is an open source scripting language similar to other modern script languages such as Perl or Python. It is substantially more powerful than UNIX/LINUX/POSIX shell script languages such as the Bourne Shell (sh), the C Shell (csh), or the Korn Shell (https://en.wikipedia.org/wiki/Shell_script). Tcl and its associated graphical user interface toolkit, Tk, were developed by John Ousterhout of the University of California. Ousterhout's group subsequently continued development of Tcl/Tk while at Sun Microsystems and later at Scriptics. Continued development is now done by an open source project team. The language has been popular for developing graphic applications and is available as public domain software for almost all computer systems (Linux, Windows and MacOS). Installation: Tcl/Tk software can be found at: http://www.activestate.com/activeTcl Binary Windows installers are available from this site for both 32 and 64 bit systems as a Free Community Edition. The lab modules were last validated with Version 8.6.4.1 but more recent versions should not be problematic. Unless Tcl has already been installed on the system being used, download and install the software from ActiveState. The installer should be run with administrative privileges. On Windows7, you should right click and 'run as administrator'. Installing with elevated privilege will allow the registry changes that map Tcl extensions and will configure the un-installer database, making later removal of ActiveTcl easier. The ActiveState default installation directory is C:/Tcl. During the installation, the installer will ask if you want this changed.
    [Show full text]
  • Shell Script Getopts Example
    Shell Script Getopts Example Gail is constrainedly cryoscopic after delegable Hilbert sag his parcloses illuminatingly. Gonzales often tootle irresistibly when tripersonal Giordano discomposed dissonantly and buffer her Barbarossa. Robert misdraws rompishly. Find that getopts script example we use later will contain whitespace separation with command Instantly share code, notes, and snippets. OPTARG is set to the period character found. They cease in many cases unneeded and brief fact that cartoon always press them its just like matter of personal coding style. File or directory or found. Operator precedence is used when there within five is more arguments. Typically, shell scripts use getopts to parse arguments passed to them. There did many ways to against your remedy environment. Nothing gets printed when no command line options are provided. The return status is zero unless an outcome is encountered while determining the name avid the he directory within an invalid option is supplied. The exit code will be success failure. Log in charge use details from one require these accounts. How does log lumber and cpu usage by an application? Now consider running it bore an unsupported option. No need only pass the positional parameters through to borrow external program. How can I check took a directory exists in a candy shell script? What extent its purpose? When optional, the fashion can buckle on led off additional functionality, as ugly a boolean option. In those cases, it contains a pointer to that parameter. How environment check ride a variable is set to Bash? Connect and deploy knowledge write a single location that is structured and fatigue to search.
    [Show full text]
  • Lecture 17 the Shell and Shell Scripting Simple Shell Scripts
    Lecture 17 The Shell and Shell Scripting In this lecture • The UNIX shell • Simple Shell Scripts • Shell variables • File System commands, IO commands, IO redirection • Command Line Arguments • Evaluating Expr in Shell • Predicates, operators for testing strings, ints and files • If-then-else in Shell • The for, while and do loop in Shell • Writing Shell scripts • Exercises In this course, we need to be familiar with the "UNIX shell". We use it, whether bash, csh, tcsh, zsh, or other variants, to start and stop processes, control the terminal, and to otherwise interact with the system. Many of you have heard of, or made use of "shell scripting", that is the process of providing instructions to shell in a simple, interpreted programming language . To see what shell we are working on, first SSH into unix.andrew.cmu.edu and type echo $SHELL ---- to see the working shell in SSH We will be writing our shell scripts for this particular shell (csh). The shell scripting language does not fit the classic definition of a useful language. It does not have many of the features such as portability, facilities for resource intensive tasks such as recursion or hashing or sorting. It does not have data structures like arrays and hash tables. It does not have facilities for direct access to hardware or good security features. But in many other ways the language of the shell is very powerful -- it has functions, conditionals, loops. It does not support strong data typing -- it is completely untyped (everything is a string). But, the real power of shell program doesn't come from the language itself, but from the diverse library that it can call upon -- any program.
    [Show full text]
  • Introduction to Shell Programming Using Bash Part I
    Introduction to shell programming using bash Part I Deniz Savas and Michael Griffiths 2005-2011 Corporate Information and Computing Services The University of Sheffield Email [email protected] [email protected] Presentation Outline • Introduction • Why use shell programs • Basics of shell programming • Using variables and parameters • User Input during shell script execution • Arithmetical operations on shell variables • Aliases • Debugging shell scripts • References Introduction • What is ‘shell’ ? • Why write shell programs? • Types of shell What is ‘shell’ ? • Provides an Interface to the UNIX Operating System • It is a command interpreter – Built on top of the kernel – Enables users to run services provided by the UNIX OS • In its simplest form a series of commands in a file is a shell program that saves having to retype commands to perform common tasks. • Shell provides a secure interface between the user and the ‘kernel’ of the operating system. Why write shell programs? • Run tasks customised for different systems. Variety of environment variables such as the operating system version and type can be detected within a script and necessary action taken to enable correct operation of a program. • Create the primary user interface for a variety of programming tasks. For example- to start up a package with a selection of options. • Write programs for controlling the routinely performed jobs run on a system. For example- to take backups when the system is idle. • Write job scripts for submission to a job-scheduler such as the sun- grid-engine. For example- to run your own programs in batch mode. Types of Unix shells • sh Bourne Shell (Original Shell) (Steven Bourne of AT&T) • csh C-Shell (C-like Syntax)(Bill Joy of Univ.
    [Show full text]
  • Simple Shell Scripting for Scientists
    Simple Shell Scripting for Scientists Day Three Julian King Bruce Beckles University of Cambridge Computing Service 1 Introduction • Who: ! Julian King, Unix Support, UCS ! Bruce Beckles, e-Science Specialist, UCS • What: ! Simple Shell Scripting for Scientists course, Day Three ! Part of the Scientific Computing series of courses • Contact (questions, etc): ! [email protected] • Health & Safety, etc: ! Fire exits • Please switch off mobile phones! [email protected] Simple Shell Scripting for Scientists: Day Three 2 As this course is part of the Scientific Computing series of courses run by the Computing Service, all the examples that we use will be more relevant to scientific computing than to system administration, etc. This does not mean that people who wish to learn shell scripting for system administration and other such tasks will get nothing from this course, as the techniques and underlying knowledge taught are applicable to shell scripts written for almost any purpose. However, such individuals should be aware that this course was not designed with them in mind. 2 What we don’t cover • Different types of shell: ! We are using the Bourne-Again SHell (bash). • Differences between versions of bash • Very advanced shell scripting – try one of these courses instead: ! “Python: Introduction for Absolute Beginners” ! “Python: Introduction for Programmers” [email protected] Simple Shell Scripting for Scientists: Day Three 3 bash is probably the most common shell on modern Unix/Linux systems – in fact, on most modern Linux distributions it will be the default shell (the shell users get if they don’t specify a different one).
    [Show full text]
  • Natural Shell: an Assistant for End-User Scripting
    International Journal of People-Oriented Programming Volume 5 • Issue 1 • January-June 2016 Natural Shell: An Assistant for End-User Scripting Xiao Liu, College of Information Sciences and Technology, Pennsylvania State University, University Park, PA, USA Yufei Jiang, College of Information Sciences and Technology, Pennsylvania State University, University Park, PA, USA Lawrence Wu, College of Information Sciences and Technology, Pennsylvania State University, University Park, PA, USA Dinghao Wu, College of Information Sciences and Technology, Pennsylvania State University, University Park, PA, USA ABSTRACT Scripting is a widely-used way to automate the execution of tasks. Despite the popularity of scripting, it remains difficult to use for both beginners and experts: because of the cryptic commands for the first group, and incompatible syntaxes across different systems, for the latter group. The authors introduce Natural Shell, an assistant for enabling end-users to generate commands and scripts for various purposes. Natural Shell automatically synthesizes scripts for different shell systems based on natural language descriptions. By interacting with Natural Shell, new users can learn the basics of scripting languages without the obstacles from the incomprehensible syntaxes. On the other hand, the authors’ tool frees more advanced users from manuals when they switch shell systems. The authors have developed a prototype system and demonstrate its effectiveness with a benchmark of 50 examples of popular shell commands collected from online forums. In addition, the authors analyzed the usage of Natural Shell in a lab study that involves 10 participants with different scripting skill levels. Natural Shell effectively assists the users to generate commands in assigned syntaxes and greatly streamlines their learning and using experience.
    [Show full text]
  • BASH Programming − Introduction HOW−TO BASH Programming − Introduction HOW−TO
    BASH Programming − Introduction HOW−TO BASH Programming − Introduction HOW−TO Table of Contents BASH Programming − Introduction HOW−TO.............................................................................................1 by Mike G mikkey at dynamo.com.ar.....................................................................................................1 1.Introduction...........................................................................................................................................1 2.Very simple Scripts...............................................................................................................................1 3.All about redirection.............................................................................................................................1 4.Pipes......................................................................................................................................................1 5.Variables...............................................................................................................................................2 6.Conditionals..........................................................................................................................................2 7.Loops for, while and until.....................................................................................................................2 8.Functions...............................................................................................................................................2
    [Show full text]
  • A Shell Script for Preparing Your Trials with a Standard Set-Up
    PhUSE US Connect 2019 Paper CT04 Quick Start Your Trials – A Shell Script for Preparing Your Trials with a Standard Set-up Edita Karosiene, Novo Nordisk A/S, Søborg, Denmark Johan Ejstrud, Novo Nordisk A/S, Aalborg, Denmark ABSTRACT In this paper we present a shell script which can set-up your trial in a few seconds. The script is using a template directory where the files needed to start a trial are placed. It can automatically find all the files in the template directory and copy them to the corresponding trial directory. If the trial ID is used anywhere in the file or directory name or within the file content, it will be replaced with an actual trial ID. In addition to this, the script automatically recognizes the updates made in the template directory so files can be easily moved, added or removed within the template with no need to update the script. The shell script can run on UNIX® or Linux® servers and can easily be adjusted for any other tasks as well. INTRODUCTION It is often the case that clinical trials or projects will have a similar technical set-up within the same company. That includes having some dedicated locations where all trial directories are placed and having a naming convention to name them. Moreover, there should be an overlap between directory structure and files that are used for many trials. This suggests an idea to have a trial template directory ready which is utilized as an example for every new trial. Having such template is already a very good idea, however it is very important to use it efficiently.
    [Show full text]
  • A Quickie Intro to UNIX, Linux, Macosx the Filesystem + Some Tools
    Introduction to UNIX Notes . Alistair Blachford A Quickie Intro to UNIX, Linux, MacOSX The Filesystem + some tools For Snooping Around 1) pwd • print the working directory 2) ls • list names of the files and subdirectories in the current directory ? ls -F list directory contents, with terminating marks to indicate subdirectories and executable files. ? ls -a list all files, even those begining with a ‘.’ ? ls -l list files in ‘long’ form giving a lot of information about each one 3) cd dirname • change the current working directory to dirname ? cd data.d change whatever the current working directory is to the directory data.d. This example assumes data.d is a subdirectory (child) of the current directory. ? cd .. change working directory to the one immediately above (parent). ? cd cd with no arguments means go to the default place — your home directory 4) who • print the list of users currently logged onto this computer 5) date • print the date and time 6) cat filename... • “copy all text” of filename(s) to the screen. When more than one filename is given, the files are concatenated end-to-end. 7) more filename • will “cat” a file to the screen, one screenfull at a time. Hit <return> to advance by only one line, <space bar> to advance by a screenfull, and <q> to quit. 8) file filename • this will make a good guess at what is contained in the file filename. Some possible responses are: binary data, ASCII text, C program text, shell commands text. 1 Introduction to UNIX Notes . Alistair Blachford For Shuffling Files 9) rm file.
    [Show full text]
  • Shell Scripting
    Shell Scripting Alexander B. Pacheco LTS Research Computing Outline 1 Introduction Types of Shell Variables File Permissions Input and Output 2 Shell Scripting Getting Started with Writing Simple Scripts Arithmetic Operations Flow Control Arrays Command Line Arguments Functions 3 Unix Utilities grep sed 4 awk programming 5 Wrap Up 2 / 76 Introduction Introduction What is a SHELL The command line interface is the primary interface to Linux/Unix operating systems. Shells are how command-line interfaces are implemented in Linux/Unix. Each shell has varying capabilities and features and the user should choose the shell that best suits their needs. The shell is simply an application running on top of the kernel and provides a powerful interface to the system. her Softwa Ot re Shell Kernel rdwa a r e H 4 / 76 Types of Shell sh : Bourne Shell Developed by Stephen Bourne at AT&T Bell Labs csh : C Shell Developed by Bill Joy at University of California, Berkeley ksh : Korn Shell Developed by David Korn at AT&T Bell Labs backward-compatible with the Bourne shell and includes many features of the C shell bash : Bourne Again Shell Developed by Brian Fox for the GNU Project as a free software replacement for the Bourne shell (sh). Default Shell on Linux and Mac OSX The name is also descriptive of what it did, bashing together the features of sh, csh and ksh tcsh : TENEX C Shell Developed by Ken Greer at Carnegie Mellon University It is essentially the C shell with programmable command line completion, command-line editing, and a few other features.
    [Show full text]
  • Shell Scripting and System Variables HORT 59000 Lecture 5 Instructor: Kranthi Varala Text Editors
    Shell scripting and system variables HORT 59000 Lecture 5 Instructor: Kranthi Varala Text editors • Programs built to assist creation and manipulation of text files, typically scripts. • nano : easy-to-learn, supports syntax highlighting, lacks GUI. • Emacs : provides basic editing functions but also extendible to add functionality. Supports GUI, extensions provide a wide range of functions. • vi/vim : extensive editing functions and relatively limited extensibility, command and insert modes distinct, steep learning curve, but very rewarding experience. Text manipulations • Tabular data files can be manipulated at a column- level. 1. Cut: Divide file & extract columns. 2. Paste: Combine multiple columns into a single table/file. • Sort: Sort lines in a file based on contents of one or more columns. • Regular expressions : defining patterns in text. Special characters and quantifiers allow search and replacement of simple-to-complex matches. • grep and awk use the power of regular expressions to make text processing very easy. Command-line operations • All commands so far are run one at a time. • Redirection and pipes allow combining a few commands together into a single pipeline. • Lacks logical complexity, such as ability to make decisions based on input / values in file. • Certain repetitive tasks are tedious to user. • All commands are being sent to and interpreted by the ‘shell’ Client/Server architecture User1 User2 Server (UNIX/ Web/ Database etc..) User3 User4 Terminology • Terminal: Device or Program used to establish a connection to the UNIX server • Shell: Program that runs on the server and interprets the commands from the terminal. • Command line: The text-interface you use to interact with the shell.
    [Show full text]