-n Do not output the trailing new line. -e Enable interpretation of the following backslash escaped characters in the strings:

Size: px
Start display at page:

Download "-n Do not output the trailing new line. -e Enable interpretation of the following backslash escaped characters in the strings:"

Transcription

1 References: [1] S. Jain, 100 Shell Programs in Unix. Pinnacle Technology, [2] M. Garrels, Bash Guide for Beginners (Second Edition). Fultus Corporation, [3] Isrd, Basics Of Os Unix And Shell Programming. Tata McGraw-Hill Education, [4] P. Seebach, Beginning Portable Shell Scripting: From Novice to Professional. Apress, [5] E. Foster-Johnson, J. C.Welch, and M. Anderson, Beginning Shell Scripting. John Wiley & Sons, [6] A. Robbins and N. H. F. Beebe, Classic Shell Scripting: Hidden Commands that Unlock the Power of Unix. O Reilly Media, Inc., [7] R. Peters, Expert Shell Scripting. Apress, [8] M. G. Venkateshmurthy, Introduction to Unix and Shell Programming. Pearson Education India, [9] G. Festari, Learning Shell Scripting with Zsh. Packt Publishing Ltd, [10] C. Newham, Learning the bash Shell: Unix Shell Programming. O Reilly Media, Inc., [11] B. Rosenblatt and A. Robbins, Learning the Korn Shell. O Reilly Media, Inc., [12] W. E. S. Jr, Linux Command Line. NO STARCH Press, [13] R. Blum and C. Bresnahan, Linux Command Line and Shell Scripting Bible. John Wiley & Sons, [14] R. Blum and C. Bresnahan, Linux Command Line and Shell Scripting Bible. John Wiley & Sons, [15] S. Lakshman, Linux Shell Scripting Cookbook. Packt Publishing Ltd, [16] S. Tushar, Linux Shell Scripting Cookbook. Packt Publishing Ltd, [17] K. O. Burtch, Linux Shell Scripting with Bash. Sams, [18] R. K. Michael, Mastering Unix Shell Scripting: Bash, Bourne, and Korn Shell Scripting for Programmers, System Administrators, and UNIX Gurus. John Wiley & Sons, [19] C. Johnson, Pro Bash Programming: Scripting the Linux Shell. Apress, [20] S. Veeraraghavan, Sams Teach Yourself Shell Programming in 24 Hours. Sams Publishing, [21] S. Parker, Shell Scripting: Expert Recipes for Linux, Bash and more. John Wiley & Sons, [22] C. F. A. Johnson, Shell Scripting Recipes: A Problem Solution Approach. Dreamtech Press, [23] A. Verma, Unix and Shell Programming. Laxmi Publications, [24] B. A. Forouzan and R. F. Gilberg, UNIX and Shell Programming: A Textbook. Brooks/Cole-Thomson Learning, [25] Y. P. Kanetkar, Unix Shell Programming. BPB Publications, [26] T. Sanchez-Clark, Unix Shell Scripting Interview Questions, Answers, and Explanations: Unix Shell Certification Review. Equity Press, [27] D. Taylor, Wicked Cool Shell Scripts: 101 Scripts for Linux, Mac OS X, and Unix Systems. No Starch Press, 2004.

2 Echo Command echo command is used to display text or value of variable. echo [options] [string, variables...] Options -n Do not output the trailing new line. -e Enable interpretation of the following backslash escaped characters in the strings: \b backspace \c suppress trailing new line \n new line \t horizontal tab \\ backslash \r carriage return For e.g. $ echo -e "An apple a day \n keeps doctor \t\taway" User Defined Variables The user defined variables (UDV) can be defined and assigned values using the following syntax : variable_name=value Here, value is assigned to the variable with variable_name. The following are few valid syntax : no=10 my_age=45 vehicle=car vehicle= vehicle= readonly no=10 #null value #null value #variable no cannot be modified Few invalid syntax : no =10 no = 10

3 no= 10 10=no Splitting Long Commands Over Multiple Lines Long commands that cannot be accommodated in a single line can be split across multiple lines. For instance a command to copy file from /var/ftp/pub/userdata/applications/file.txt from server1.mylinux.com to the directory /var/ftp/pub/userdata/applications/ directory of server2.mylinux.com will be like: scp xyz@server1.mylinux.com: /var/ftp/pub/userdata/applications/file.txt xyz@server2.mylinux.com:/var/ftp/pub/userdata/applications/ The above command can be split within the script using concatenation operator (\). So the large command spanning several lines can be made more readable. The concatenation operator applied to the above command looks like: scp xyz@server1.mylinux.com:\ /var/ftp/pub/userdata/applications/file.txt\ xyz@server2.mylinux.com:\ /var/ftp/pub/userdata/applications/ Putting Multiple Commands on a Single Line Multiple commands can be grouped together in a single line using the semicolon (;) operator. The following commands will all execute even if one of the preceding command fails: $ cat file1 ; cat file2 ; cat file3 However, if we want to abort subsequent commands if any one command fails, we can use the and (&&) operator as follows: $ cat file1 && cat file2 && cat file3 We can use the or ( ) operator which ensures that if the first command fails, the second one will never be executed. $ cat file1 cat file2 cat file3

4 Creating custom commands Shell scripts can be converted to user defined commands or custom commands. Suppose we have create a shell program that displays date in a given format along with the count of users. Let us assume the file is mydate. We can create our own command mydate by making this script executable and placing it in one of the directories pointed by the PATH variable. For instance, we can place the mydate file in the /home/richard/bin directory so that the shell program becomes a command. Few Sample Scripts Script-1 #Script to reverse the name echo "Enter your name : " read nm echo "Reverse of your name is : " echo "$nm" rev Script-2 #Script to append content of first file into second file echo "First file : $1" echo "Second file : $2" cat $1 >> $2 Script-3 #Script to display line count of a file echo "File name : $1" cnt=`wc -l $1` echo "Count : $cnt" Script-4 #Using functions within shell scripts getdata() { echo "Enter your name : " read name echo "Enter your age : " read age } showdata() { echo "Your name: $name" echo "Your age: $age"

5 } getdata showdata Script-5 #store in file : demo.sh #execute as $demo.sh a b c d e f g

Module # 14 References:

Module # 14 References: Module # 14 References: [1] S. Jain, 100 Shell Programs in Unix. Pinnacle Technology, 2009. [2] M. Garrels, Bash Guide for Beginners (Second Edition). Fultus Corporation, 2010. [3] Isrd, Basics Of Os Unix

More information

Oracle Shell Scripting Linux And Unix Programming For Oracle Oracle In Focus Series Volume 26

Oracle Shell Scripting Linux And Unix Programming For Oracle Oracle In Focus Series Volume 26 Oracle Shell Scripting Linux And Unix Programming For Oracle Oracle In Focus Series Volume 26 We have made it easy for you to find a PDF Ebooks without any digging. And by having access to our ebooks online

More information

Here Scripts. Writing An HTML File With A Script

Here Scripts. Writing An HTML File With A Script Here Scripts Beginning with this lesson, we will construct a useful application. This application will produce an HTML document that contains information about your system. I spent a lot of time thinking

More information

CS 25200: Systems Programming. Lecture 10: Shell Scripting in Bash

CS 25200: Systems Programming. Lecture 10: Shell Scripting in Bash CS 25200: Systems Programming Lecture 10: Shell Scripting in Bash Dr. Jef Turkstra 2018 Dr. Jeffrey A. Turkstra 1 Lecture 10 Getting started with Bash Data types Reading and writing Control loops Decision

More information

What is UNIX? A Little Bit about UNIX and User Interfaces. Adapted from Practical Unix and Programming Hunter College

What is UNIX? A Little Bit about UNIX and User Interfaces. Adapted from Practical Unix and Programming Hunter College What is UNIX? A Little Bit about UNIX and User Interfaces Adapted from Practical Unix and Programming Hunter College Copyright 2006 Stewart Weiss What is UNIX? It is a multi-user, multi-tasking operating

More information

2. UDP Client, UDP Server

2. UDP Client, UDP Server 2. UDP Client, UDP Server VI Case study on designing network topology A case study to design and configure any organization network eg. College network or campus network, using any packet tracer or network

More information

B.Sc. (Computer Applications) Vocational - First Year. II Application Software hrs III Practical (Windows, Word, Excel, Power Point)

B.Sc. (Computer Applications) Vocational - First Year. II Application Software hrs III Practical (Windows, Word, Excel, Power Point) B.Sc. (Computer Applications) Vocational - First Year Paper No. Title of Paper External Internal Assessment Max. Pass Exam Duration Semester I I Introduction to PC & Windows 40 5 45 16 3hrs Operating System

More information

Course Outline. TERM EFFECTIVE: Fall 2016 CURRICULUM APPROVAL DATE: 11/23/2015

Course Outline. TERM EFFECTIVE: Fall 2016 CURRICULUM APPROVAL DATE: 11/23/2015 5055 Santa Teresa Blvd Gilroy, CA 95023 Course Outline COURSE: CSIS 49 DIVISION: 50 ALSO LISTED AS: TERM EFFECTIVE: Fall 2016 CURRICULUM APPROVAL DATE: 11/23/2015 SHORT TITLE: UNIX SHELL PROGRAM LONG TITLE:

More information

Learning The Bash Shell: Unix Shell Programming (In A Nutshell (O'Reilly)) PDF

Learning The Bash Shell: Unix Shell Programming (In A Nutshell (O'Reilly)) PDF Learning The Bash Shell: Unix Shell Programming (In A Nutshell (O'Reilly)) PDF O'Reilly's bestselling book on Linux's bash shell is at it again. Now that Linux is an established player both as a server

More information

Examples: Directory pathname: File pathname: /home/username/ics124/assignments/ /home/username/ops224/assignments/assn1.txt

Examples: Directory pathname: File pathname: /home/username/ics124/assignments/ /home/username/ops224/assignments/assn1.txt ULI101 Week 03 Week Overview Absolute and relative pathnames File name expansion Shell basics Command execution in detail Recalling and editing previous commands Quoting Pathnames A pathname is a list

More information

Filemaker Pro Design & Scripting For Dummies Free Download PDF

Filemaker Pro Design & Scripting For Dummies Free Download PDF Filemaker Pro Design & Scripting For Dummies Free Download PDF Get the scoop on designing databases for Mac and Windows Use FileMaker Pro design and scripting to quickly, easily build databases that solve

More information

Introduction to Linux Basics Part II. Georgia Advanced Computing Resource Center University of Georgia Suchitra Pakala

Introduction to Linux Basics Part II. Georgia Advanced Computing Resource Center University of Georgia Suchitra Pakala Introduction to Linux Basics Part II 1 Georgia Advanced Computing Resource Center University of Georgia Suchitra Pakala pakala@uga.edu 2 Variables in Shell HOW DOES LINUX WORK? Shell Arithmetic I/O and

More information

Table of contents. Our goal. Notes. Notes. Notes. Summer June 29, Our goal is to see how we can use Unix as a tool for developing programs

Table of contents. Our goal. Notes. Notes. Notes. Summer June 29, Our goal is to see how we can use Unix as a tool for developing programs Summer 2010 Department of Computer Science and Engineering York University Toronto June 29, 2010 1 / 36 Table of contents 1 2 3 4 2 / 36 Our goal Our goal is to see how we can use Unix as a tool for developing

More information

T. Y. B. C. A. Semester 5 Effective From: June 2013.

T. Y. B. C. A. Semester 5 Effective From: June 2013. Paper No.: 501 (Core Paper-1) Teaching Hours: 4 Hrs./Week Paper Title: PHP MySQL Credits: 4 Prerequisite: Aim: Basic knowledge of scripting language and HTML. To make students aware of open source web-based

More information

Bourne Shell Reference

Bourne Shell Reference > Linux Reviews > Beginners: Learn Linux > Bourne Shell Reference Bourne Shell Reference found at Br. David Carlson, O.S.B. pages, cis.stvincent.edu/carlsond/cs330/unix/bshellref - Converted to txt2tags

More information

ACHARYA NAGARJUNA UNIVERSITY B.Sc., (ERP, Multimedia and Web Designing) CBCS from st Year 2nd Semester - E R P

ACHARYA NAGARJUNA UNIVERSITY B.Sc., (ERP, Multimedia and Web Designing) CBCS from st Year 2nd Semester - E R P 1 st Year 2nd Semester - E R P Paper 203 Accounting with Tally Unit I: Generating Basic Reports: Financial Statements, Accounting Books and Registers: - Cash Book, Bank Book, Purchase Register, Sales Register,

More information

UNIX, GNU/Linux and simple tools for data manipulation

UNIX, GNU/Linux and simple tools for data manipulation UNIX, GNU/Linux and simple tools for data manipulation Dr Jean-Baka DOMELEVO ENTFELLNER BecA-ILRI Hub Basic Bioinformatics Training Workshop @ILRI Addis Ababa Wednesday December 13 th 2017 Dr Jean-Baka

More information

KLS s Gogte Institute of Technology, Udyambag, Belagavi. CLO 1: To provide introduction to UNIX Operating System and its File System

KLS s Gogte Institute of Technology, Udyambag, Belagavi. CLO 1: To provide introduction to UNIX Operating System and its File System KLS s Gogte Institute of Technology, Udyambag, Belagavi Course Document Academic Year:2016-17 Department of CSE Course Title : UNIX Shell programming Credits: 4 Course Code :15CS33 L:T:P -3-1-0 Course

More information

Mastering UNIX Shell Scripting

Mastering UNIX Shell Scripting Mastering UNIX Shell Scripting Bash, Bourne, and Korn Shell Scripting for Programmers, System Administrators, and UNIX Gurus Second Edition Randal K. Michael Wiley Publishing, Inc. Mastering UNIX Shell

More information

Korn Shell Unix And Linux Programming Manual Third Edition Pdf

Korn Shell Unix And Linux Programming Manual Third Edition Pdf Korn Shell Unix And Linux Programming Manual Third Edition Pdf Programming Unix in is ISBN: Warez Web, Unix Edition manual shell Linux Patrick Korn Shell unix and linux Programming Manual, 3rd ed 2001

More information

Essential Linux Shell Commands

Essential Linux Shell Commands Essential Linux Shell Commands Special Characters Quoting and Escaping Change Directory Show Current Directory List Directory Contents Working with Files Working with Directories Special Characters There

More information

The Linux Programming Interface: A Linux And UNIX System Programming Handbook Ebooks Free

The Linux Programming Interface: A Linux And UNIX System Programming Handbook Ebooks Free The Linux Programming Interface: A Linux And UNIX System Programming Handbook Ebooks Free The Linux Programming Interface is the definitive guide to the Linux and UNIX programming interfaceâ the interface

More information

CPS221 Lecture: Operating System Functions

CPS221 Lecture: Operating System Functions CPS221 Lecture: Operating System Functions Objectives 1. To overview key hardware concepts 2. To introduce the process concept 3. To discuss the various kinds of functionality of the OS last revised 8/25/11

More information

CSE II-Sem)

CSE II-Sem) 1 2 a) Login to the system b) Use the appropriate command to determine your login shell c) Use the /etc/passwd file to verify the result of step b. d) Use the who command and redirect the result to a file

More information

Linux for Beginners. Windows users should download putty or bitvise:

Linux for Beginners. Windows users should download putty or bitvise: Linux for Beginners Windows users should download putty or bitvise: https://putty.org/ Brief History UNIX (1969) written in PDP-7 assembly, not portable, and designed for programmers as a reaction by Bell

More information

ITT Technical Institute. CS120 Programming in Visual Basic Onsite Course SYLLABUS

ITT Technical Institute. CS120 Programming in Visual Basic Onsite Course SYLLABUS ITT Technical Institute CS120 Programming in Visual Basic Onsite Course SYLLABUS Credit hours: 4 Contact/Instructional hours: 50 (30 Theory Hours, 20 Lab Hours) Prerequisite(s) and/or Corequisite(s): Prerequisite:

More information

CSCI 211 UNIX Lab. Shell Programming. Dr. Jiang Li. Jiang Li, Ph.D. Department of Computer Science

CSCI 211 UNIX Lab. Shell Programming. Dr. Jiang Li. Jiang Li, Ph.D. Department of Computer Science CSCI 211 UNIX Lab Shell Programming Dr. Jiang Li Why Shell Scripting Saves a lot of typing A shell script can run many commands at once A shell script can repeatedly run commands Help avoid mistakes Once

More information

Shell script. Shell Scripts. A shell script contains a sequence of commands in a text file. Shell is an command language interpreter.

Shell script. Shell Scripts. A shell script contains a sequence of commands in a text file. Shell is an command language interpreter. Shell Scripts A shell script contains a sequence of commands in a text file. Shell is an command language interpreter. Shell executes commands read from a file. Shell is a powerful programming available

More information

DOWNLOAD OR READ : UNIX FOR MAC OS X 10 4 TIGER VISUAL QUICKPRO GUIDE PDF EBOOK EPUB MOBI

DOWNLOAD OR READ : UNIX FOR MAC OS X 10 4 TIGER VISUAL QUICKPRO GUIDE PDF EBOOK EPUB MOBI DOWNLOAD OR READ : UNIX FOR MAC OS X 10 4 TIGER VISUAL QUICKPRO GUIDE PDF EBOOK EPUB MOBI Page 1 Page 2 unix for mac os x 10 4 tiger visual quickpro guide unix for mac os pdf unix for mac os x 10 4 tiger

More information

Introduction: What is Unix?

Introduction: What is Unix? Introduction Introduction: What is Unix? An operating system Developed at AT&T Bell Labs in the 1960 s Command Line Interpreter GUIs (Window systems) are now available Introduction: Unix vs. Linux Unix

More information

Bash print to stderr

Bash print to stderr P ford residence southampton, ny Bash print to stderr Jul 27, 2014. How to write or echo messages to stderr stream within a shell script. By default, output messages are written to stdout stream only.

More information

Gujarat University M. Sc. Computer Science [S. F.] Semester-1 Syllabus Gujarat Arts & Science College, Ahmedabad.

Gujarat University M. Sc. Computer Science [S. F.] Semester-1 Syllabus Gujarat Arts & Science College, Ahmedabad. B. Sc. Computer Science SEM-II EFFECTIVE FROM ACADEMIC YEAR - 2016-2017 CODE Titles Th. Pr. COM-103 ProgramminginC (Theory) 4 COM-104 ProgramminginC(Practical) 4 Teaching Scheme Unit Computer Theory COM

More information

1. Introduction to PHP 1.1 Installation of PHP and mysql 1.2 PHP configuration in IIS & Apache Web Server and features of PHP

1. Introduction to PHP 1.1 Installation of PHP and mysql 1.2 PHP configuration in IIS & Apache Web Server and features of PHP Paper No.: 501 Paper Title: PHP MYSQL 1. Introduction to PHP 1.1 Installation of PHP and mysql 1.2 PHP configuration in IIS & Apache Web Server and features of PHP 2. Writing PHP 2.1. How PHP code is parsed

More information

Mastering Windows Powershell Scripting Second Edition One Stop Guide To Automating Administrative Tasks

Mastering Windows Powershell Scripting Second Edition One Stop Guide To Automating Administrative Tasks Mastering Windows Powershell Scripting Second Edition One Stop Guide To Automating Administrative Tasks We have made it easy for you to find a PDF Ebooks without any digging. And by having access to our

More information

Mastering Windows Powershell Scripting Second Edition One Stop Guide To Automating Administrative Tasks

Mastering Windows Powershell Scripting Second Edition One Stop Guide To Automating Administrative Tasks Mastering Windows Powershell Scripting Second Edition One Stop Guide To Automating Administrative Tasks We have made it easy for you to find a PDF Ebooks without any digging. And by having access to our

More information

Bashed One Too Many Times. Features of the Bash Shell St. Louis Unix Users Group Jeff Muse, Jan 14, 2009

Bashed One Too Many Times. Features of the Bash Shell St. Louis Unix Users Group Jeff Muse, Jan 14, 2009 Bashed One Too Many Times Features of the Bash Shell St. Louis Unix Users Group Jeff Muse, Jan 14, 2009 What is a Shell? The shell interprets commands and executes them It provides you with an environment

More information

PHP by Pearson Education, Inc. All Rights Reserved.

PHP by Pearson Education, Inc. All Rights Reserved. PHP 1992-2012 by Pearson Education, Inc. All Client-side Languages User-agent (web browser) requests a web page JavaScript is executed on PC http request Can affect the Browser and the page itself http

More information

Deccan Education Society s FERGUSSON COLLEGE, PUNE (AUTONOMOUS) SYLLABUS UNDER AUTONOMY. FIRST YEAR B.Sc. COMPUTER SCIENCE SEMESTER I

Deccan Education Society s FERGUSSON COLLEGE, PUNE (AUTONOMOUS) SYLLABUS UNDER AUTONOMY. FIRST YEAR B.Sc. COMPUTER SCIENCE SEMESTER I Deccan Education Society s FERGUSSON COLLEGE, PUNE (AUTONOMOUS) SYLLABUS UNDER AUTONOMY FIRST YEAR B.Sc. COMPUTER SCIENCE SEMESTER I SYLLABUS OF COMPUTER SCIENCE Academic Year 2016-2017 Deccan Education

More information

COMP 4/6262: Programming UNIX

COMP 4/6262: Programming UNIX COMP 4/6262: Programming UNIX Lecture 12 shells, shell programming: passing arguments, if, debug March 13, 2006 Outline shells shell programming passing arguments (KW Ch.7) exit status if (KW Ch.8) test

More information

Python Class-Lesson1 Instructor: Yao

Python Class-Lesson1 Instructor: Yao Python Class-Lesson1 Instructor: Yao What is Python? Python is an interpreted, object-oriented, high-level programming language with dynamic semantics. Its high-level built in data structures, combined

More information

CS 307: UNIX PROGRAMMING ENVIRONMENT FIND COMMAND

CS 307: UNIX PROGRAMMING ENVIRONMENT FIND COMMAND CS 307: UNIX PROGRAMMING ENVIRONMENT FIND COMMAND Prof. Michael J. Reale Fall 2014 Finding Files in a Directory Tree Suppose you want to find a file with a certain filename (or with a filename matching

More information

Unix Shells and Other Basic Concepts

Unix Shells and Other Basic Concepts CSCI 2132: Software Development Unix Shells and Other Basic Concepts Norbert Zeh Faculty of Computer Science Dalhousie University Winter 2019 Shells Shell = program used by the user to interact with the

More information

Read & Download (PDF Kindle) The Art Of UNIX Programming

Read & Download (PDF Kindle) The Art Of UNIX Programming Read & Download (PDF Kindle) The Art Of UNIX Programming The Art of UNIX Programming poses the belief that understanding the unwritten UNIX engineering tradition and mastering its design patterns will

More information

TOP 10 FREE PYTHON PROGRAMMING BOOKS - DOWNLOAD PDF OR

TOP 10 FREE PYTHON PROGRAMMING BOOKS - DOWNLOAD PDF OR PDF EBOOK3000 TOP 10 FREE PYTHON PROGRAMMING BOOKS - DOWNLOAD PDF OR 1 / 5 2 / 5 3 / 5 java database programming bible pdf ebook Details: Paperback: 366 pages Publisher: WOW! ebook; 1st edition (April

More information

Introduction to Linux

Introduction to Linux Introduction to Linux The command-line interface A command-line interface (CLI) is a type of interface, that is, a way to interact with a computer. Window systems, punched cards or a bunch of dials, buttons

More information

Manual Shell Script Linux If Not Exist Directory Does

Manual Shell Script Linux If Not Exist Directory Does Manual Shell Script Linux If Not Exist Directory Does Bash can be configured to be POSIX-confor mant by default. and then a much longer manual available using info (usually they refer to the info page

More information

Lec 1 add-on: Linux Intro

Lec 1 add-on: Linux Intro Lec 1 add-on: Linux Intro Readings: - Unix Power Tools, Powers et al., O Reilly - Linux in a Nutshell, Siever et al., O Reilly Summary: - Linux File System - Users and Groups - Shell - Text Editors - Misc

More information

COMP 2718: The OS, Shell, Terminal, and Text

COMP 2718: The OS, Shell, Terminal, and Text COMP 2718: The OS, Shell, Terminal, and Text By: Dr. Andrew Vardy Adapted from the notes of Dr. Rod Byrne Outline What is an Operating System? The Shell and Terminal How are Characters Encoded? Standard

More information

Prof. Navrati Saxena TA: R. Sachan

Prof. Navrati Saxena TA: R. Sachan Prof. Navrati Saxena navrati@ece.skku.ac.kr TA: R. Sachan rochak@skku.edu What is UNIX Command What is UNIX Shell Linux file structure UNIX/LINUX Commands 2 A command is a program which interacts with

More information

Table Of Contents. 1. Zoo Information a. Logging in b. Transferring files 2. Unix Basics 3. Homework Commands

Table Of Contents. 1. Zoo Information a. Logging in b. Transferring files 2. Unix Basics 3. Homework Commands Table Of Contents 1. Zoo Information a. Logging in b. Transferring files 2. Unix Basics 3. Homework Commands Getting onto the Zoo Type ssh @node.zoo.cs.yale.edu, and enter your netid pass when prompted.

More information

12.1 UNDERSTANDING UNIX SHELL PROGRAMMING LANGUAGE: AN INTRODUCTION Writing a Simple Script Executing a Script

12.1 UNDERSTANDING UNIX SHELL PROGRAMMING LANGUAGE: AN INTRODUCTION Writing a Simple Script Executing a Script 12 Shell Programming This chapter concentrates on shell programming. It explains the capabilities of the shell as an interpretive high-level language. It describes shell programming constructs and particulars.

More information

Linux & Shell Programming 2014

Linux & Shell Programming 2014 Unit -1: Introduction to UNIX/LINUX Operating System Practical Practice Questions: Find errors (if any) otherwise write output or interpretation of following commands. (Consider default shell is bash shell.)

More information

Chapter 2, Part I Introduction to C Programming

Chapter 2, Part I Introduction to C Programming Chapter 2, Part I Introduction to C Programming C How to Program, 8/e, GE 2016 Pearson Education, Ltd. All rights reserved. 1 2016 Pearson Education, Ltd. All rights reserved. 2 2016 Pearson Education,

More information

Read & Download (PDF Kindle) System Programming With C And Unix

Read & Download (PDF Kindle) System Programming With C And Unix Read & Download (PDF Kindle) System Programming With C And Unix Beginning computing students often finish the introduction to programming course without having had exposure to various system tools, without

More information

do shell script in AppleScript

do shell script in AppleScript Technical Note TN2065 do shell script in AppleScript This Technote answers frequently asked questions about AppleScript s do shell script command, which was introduced in AppleScript 1.8. This technical

More information

Lecture 8. Introduction to Shell Programming. COP 3353 Introduction to UNIX

Lecture 8. Introduction to Shell Programming. COP 3353 Introduction to UNIX Lecture 8 Introduction to Shell Programming COP 3353 Introduction to UNIX 1 What is a shell script? An executable file containing Unix shell commands Programming control constructs (if, then, while, until,

More information

Appendix A GLOSSARY. SYS-ED/ Computer Education Techniques, Inc.

Appendix A GLOSSARY. SYS-ED/ Computer Education Techniques, Inc. Appendix A GLOSSARY SYS-ED/ Computer Education Techniques, Inc. $# Number of arguments passed to a script. $@ Holds the arguments; unlike $* it has the capability for separating the arguments. $* Holds

More information

Bash Reference Manual

Bash Reference Manual Bash Reference Manual Reference Documentation for Bash Edition 3.1-beta1, for Bash Version 3.1-beta1. September 2005 Chet Ramey, Case Western Reserve University Brian Fox, Free Software Foundation This

More information

Mac OS X Part 2. The University of Utah Student Computing Labs Macintosh Support

Mac OS X Part 2. The University of Utah Student Computing Labs Macintosh Support Mac OS X Mac OS X Part 2 The University of Utah Student Computing Labs Macintosh Support mac@scl.utah.edu We Will Cover Resources for switching to Mac OS X Resources for adding Mac OS X Basic differences

More information

Teaching and Examination Scheme: PAPER HRS TH TU PR TH PR OR TW TOTAL

Teaching and Examination Scheme: PAPER HRS TH TU PR TH PR OR TW TOTAL Course Name : Computer Engineering Group Course Code : CO/CD/CM/CW/IF Semester : Fifth for CO/CM/CW/IF and Sixth for CD Subject Title : Operating System Subject Code : 17512 Teaching and Examination Scheme:

More information

Linux Command Line and Shell Scripting Bible

Linux Command Line and Shell Scripting Bible Linux Command Line and Shell Scripting Bible Richard Blum Wiley Publishing, Inc. Linux Command Line and Shell Scripting Bible Linux Command Line and Shell Scripting Bible Richard Blum Wiley Publishing,

More information

Linux shell scripting Getting started *

Linux shell scripting Getting started * Linux shell scripting Getting started * David Morgan *based on chapter by the same name in Classic Shell Scripting by Robbins and Beebe What s s a script? text file containing commands executed as a unit

More information

How To Use The UNIX-LINUX Vi Text Editor: Tips, Tricks, And Techniques (And Tutorials Too!) By Larry L. Smith READ ONLINE

How To Use The UNIX-LINUX Vi Text Editor: Tips, Tricks, And Techniques (And Tutorials Too!) By Larry L. Smith READ ONLINE How To Use The UNIX-LINUX Vi Text Editor: Tips, Tricks, And Techniques (And Tutorials Too!) By Larry L. Smith READ ONLINE How To Use the UNIX-LINUX vi Text Editor: Tips, Tricks, and - This book, which

More information

CS246 Spring14 Programming Paradigm Notes on Linux

CS246 Spring14 Programming Paradigm Notes on Linux 1 Unix History 1965: Researchers from Bell Labs and other organizations begin work on Multics, a state-of-the-art interactive, multi-user operating system. 1969: Bell Labs researchers, losing hope for

More information

Name of chapter & details

Name of chapter & details Course Title Course Code Operating Systems CE410 Theory : 03 Course Credit Practical : 01 Tutorial : 00 Credits : 04 Course Learning Outcomes On the completion of the course, students will be able to:

More information

Shells. A shell is a command line interpreter that is the interface between the user and the OS. The shell:

Shells. A shell is a command line interpreter that is the interface between the user and the OS. The shell: Shells A shell is a command line interpreter that is the interface between the user and the OS. The shell: analyzes each command determines what actions are to be performed performs the actions Example:

More information

CSC 280 Operating System Principles

CSC 280 Operating System Principles Computer Science Department cs.salemstate.edu CSC 280 Operating System Principles 3 cr. Instructor: TBA Office: location Phone: (978) 542-extension email: TBA@salemstate.edu Office Hours: days and times

More information

AC109/AT109 UNIX & SHELL PROGRAMMING DEC 2014

AC109/AT109 UNIX & SHELL PROGRAMMING DEC 2014 Q.2 a. Explain the principal components: Kernel and Shell, of the UNIX operating system. Refer Page No. 22 from Textbook b. Explain absolute and relative pathnames with the help of examples. Refer Page

More information

Free Downloads Learning The UNIX Operating System, Fifth Edition

Free Downloads Learning The UNIX Operating System, Fifth Edition Free Downloads Learning The UNIX Operating System, Fifth Edition If you are new to Unix, this concise book will tell you just what you need to get started and no more. Unix was one of the first operating

More information

Introduction to the Shell

Introduction to the Shell [Software Development] Introduction to the Shell Davide Balzarotti Eurecom Sophia Antipolis, France What a Linux Desktop Installation looks like What you need Few Words about the Graphic Interface Unlike

More information

Contents. Note: pay attention to where you are. Note: Plaintext version. Note: pay attention to where you are... 1 Note: Plaintext version...

Contents. Note: pay attention to where you are. Note: Plaintext version. Note: pay attention to where you are... 1 Note: Plaintext version... Contents Note: pay attention to where you are........................................... 1 Note: Plaintext version................................................... 1 Hello World of the Bash shell 2 Accessing

More information

Introduction to Bash Programming. Dr. Xiaolan Zhang Spring 2013 Dept. of Computer & Information Sciences Fordham University

Introduction to Bash Programming. Dr. Xiaolan Zhang Spring 2013 Dept. of Computer & Information Sciences Fordham University Introduction to Bash Programming Dr. Xiaolan Zhang Spring 2013 Dept. of Computer & Information Sciences Fordham University 1 Outline Shell command line syntax Shell builtin commands Shell variables, arguments

More information

System Administration

System Administration Süsteemihaldus MTAT.08.021 System Administration File system basics UNIX shell basics 1/23 2/23 3/23 4/23 5/23 6/23 System Root Mount points User Profiles /home /boot /dev/sda Boot loader files and Linux

More information

1. Hello World Bash Shell Script. Last Updated on Wednesday, 13 April :03

1. Hello World Bash Shell Script. Last Updated on Wednesday, 13 April :03 1 of 18 21/10/2554 9:39 Bash scripting Tutorial tar -czf myhome_directory.tar.gz /home/linuxcong Last Updated on Wednesday, 13 April 2011 08:03 Article Index 1. Hello World Bash Shell Script 2. Simple

More information

Manual Shell Script Linux If Not Equals. Statement >>>CLICK HERE<<<

Manual Shell Script Linux If Not Equals. Statement >>>CLICK HERE<<< Manual Shell Script Linux If Not Equals Statement The bash shell supports if and switch (case) decision statements. else ### series of code if the condition is not satisfied fi. Multiple if condition:

More information

Subcontractors. bc math help for the shell. interactive or programatic can accept its commands from stdin can accept an entire bc program s worth

Subcontractors. bc math help for the shell. interactive or programatic can accept its commands from stdin can accept an entire bc program s worth Subcontractors bc, xargs,, find David 2011-14 bc math help for the shell interactive or programatic can accept its commands from stdin can accept an entire bc program s worth 1 bc math help for shell bc,

More information

Prefix COMP Course# 421 Title Unix for Programmers Units (3) 3 hours lecture per week 3 hours lecture per week

Prefix COMP Course# 421 Title Unix for Programmers Units (3) 3 hours lecture per week 3 hours lecture per week CALIFORNIA STATE UNIVERSITY CHANNEL ISLANDS COURSE MODIFICATION PROPOSAL Courses must be submitted by October 15, 2010, to make the next catalog (2011-12) production DATE (CHANGE DATE EACH TIME REVISED):

More information

S E C T I O N O V E R V I E W

S E C T I O N O V E R V I E W AN INTRODUCTION TO SHELLS S E C T I O N O V E R V I E W Continuing from last section, we are going to learn about the following concepts: understanding quotes and escapes; considering the importance of

More information

BEGINNER SQL PROGRAMMING USING MICROSOFT SQL SERVER 2012

BEGINNER SQL PROGRAMMING USING MICROSOFT SQL SERVER 2012 BEGINNER SQL PROGRAMMING USING PDF EBOOK3000 LEARNING SQL PROGRAMMING - LYNDA.COM 1 / 6 2 / 6 3 / 6 beginner sql programming using pdf ebook Details: Paperback: 206 pages Publisher: WOW! ebook (September

More information

BEGINNER SQL PROGRAMMING USING MICROSOFT SQL SERVER 2016

BEGINNER SQL PROGRAMMING USING MICROSOFT SQL SERVER 2016 BEGINNER SQL PROGRAMMING USING PDF EBOOK3000 LEARNING SQL PROGRAMMING - LYNDA.COM 1 / 6 2 / 6 3 / 6 beginner sql programming using pdf ebook Details: Paperback: 296 pages Publisher: WOW! ebook (September

More information

Practical Computing-II. Programming in the Linux Environment. 0. An Introduction. B.W.Gore. March 20, 2015

Practical Computing-II. Programming in the Linux Environment. 0. An Introduction. B.W.Gore. March 20, 2015 Practical Computing-II March 20, 2015 0. An Introduction About The Course CMS M.2.2 Practical Computing-II About The Course CMS M.2.2 Practical Computing-II 25 credits (33.33% weighting) About The Course

More information

Bash scripting Tutorial. Hello World Bash Shell Script. Super User Programming & Scripting 22 March 2013

Bash scripting Tutorial. Hello World Bash Shell Script. Super User Programming & Scripting 22 March 2013 Bash scripting Tutorial Super User Programming & Scripting 22 March 2013 Hello World Bash Shell Script First you need to find out where is your bash interpreter located. Enter the following into your command

More information

hrs. Designing Fundamentals 2 Paper-II: Data base hrs. management Systems Semester IV 3 Paper-I: Web

hrs. Designing Fundamentals 2 Paper-II: Data base hrs. management Systems Semester IV 3 Paper-I: Web SCHEME OF EXAMINATION FOR B.Sc. COMPUTER APPLICATIONS (VOCATIONAL) SEMESTER SYSTEM Scheme for B.Sc.-II (Vocational) w.e.f. 2014-2015 Sr. No. Paper Internal External Marks Exam Duration Assessment SEMESTER

More information

Shell Script Programming 2

Shell Script Programming 2 Shell Script Programming 2 David Morgan Useful capabilities parameter processing validation usage checking user input custom functions filenames decomposition, tempnames, random names action hinged on

More information

VEER NARMAD SOUTH GUJARAT UNIVERSITY, SURAT D. C. A. (1 st SEMESTER) SYLLABUS

VEER NARMAD SOUTH GUJARAT UNIVERSITY, SURAT D. C. A. (1 st SEMESTER) SYLLABUS Effective From : August 2006 (L : 4; P : 0) PAPER NO. : 101 Paper Title : COMPUTER ORGANIZATION & FUNDAMENTALS OF OPERATING SYSTEMS Aim & Objective : To teach Computer Fundamentals, internal working &

More information

Manual Shell Script Linux If Not Equal String Comparison

Manual Shell Script Linux If Not Equal String Comparison Manual Shell Script Linux If Not Equal String Comparison From the Linux ping manual: If mkdir d failed, and returned a non-0 exit code, Bash will skip the next command, and we will stay in the current

More information

Bash Reference Manual Reference Documentation for Bash Edition 2.5b, for Bash Version 2.05b. July 2002

Bash Reference Manual Reference Documentation for Bash Edition 2.5b, for Bash Version 2.05b. July 2002 .tex Bash Reference Manual Reference Documentation for Bash Edition 2.5b, for Bash Version 2.05b. July 2002 Chet Ramey, Case Western Reserve University Brian Fox, Free Software Foundation Copyright c 1991-2002

More information

COMS 6100 Class Notes 3

COMS 6100 Class Notes 3 COMS 6100 Class Notes 3 Daniel Solus September 1, 2016 1 General Remarks The class was split into two main sections. We finished our introduction to Linux commands by reviewing Linux commands I and II

More information

Chapter 4. Unix Tutorial. Unix Shell

Chapter 4. Unix Tutorial. Unix Shell Chapter 4 Unix Tutorial Users and applications interact with hardware through an operating system (OS). Unix is a very basic operating system in that it has just the essentials. Many operating systems,

More information

RH033 Red Hat Linux Essentials

RH033 Red Hat Linux Essentials RH033 Red Hat Linux Essentials Version 3.5 QUESTION NO: 1 You work as a Network Administrator for McNeil Inc. The company has a Linux-based network. A printer is configured on the network. You want to

More information

27-Sep CSCI 2132 Software Development Lab 4: Exploring bash and C Compilation. Faculty of Computer Science, Dalhousie University

27-Sep CSCI 2132 Software Development Lab 4: Exploring bash and C Compilation. Faculty of Computer Science, Dalhousie University Lecture 4 p.1 Faculty of Computer Science, Dalhousie University CSCI 2132 Software Development Lab 4: Exploring bash and C Compilation 27-Sep-2017 Location: Goldberg CS Building Time: Wednesday, 16:05

More information

Linux Operating System Environment Computadors Grau en Ciència i Enginyeria de Dades Q2

Linux Operating System Environment Computadors Grau en Ciència i Enginyeria de Dades Q2 Linux Operating System Environment Computadors Grau en Ciència i Enginyeria de Dades 2017-2018 Q2 Facultat d Informàtica de Barcelona This first lab session is focused on getting experience in working

More information

Linux at the Command Line Don Johnson of BU IS&T

Linux at the Command Line Don Johnson of BU IS&T Linux at the Command Line Don Johnson of BU IS&T We ll start with a sign in sheet. We ll end with a class evaluation. We ll cover as much as we can in the time allowed; if we don t cover everything, you

More information

Linux & Shell Programming 2014

Linux & Shell Programming 2014 Practical No : 1 Enrollment No: Group : A Practical Problem Write a date command to display date in following format: (Consider current date as 4 th January 2014) 1. dd/mm/yy hh:mm:ss 2. Today's date is:

More information

Linux shell scripting intro/review

Linux shell scripting intro/review Linux shell scripting intro/review David Morgan You should already know how to log in run programs at the command line use pipelines and redirection ( < > ) put jobs in the background ( & ) create and

More information

Proposed syllabus for

Proposed syllabus for Proposed syllabus for Skill Enhancement Course Papers for B.Sc.(H) Mathematics/ B.Sc. (Prog)/B.A.(Prog) Department of Mathematics University of Delhi Delhi-110007 1 Sl. No. CORE COURSE (12) I II III IV

More information

Introduction to Linux Part 2b: basic scripting. Brett Milash and Wim Cardoen CHPC User Services 18 January, 2018

Introduction to Linux Part 2b: basic scripting. Brett Milash and Wim Cardoen CHPC User Services 18 January, 2018 Introduction to Linux Part 2b: basic scripting Brett Milash and Wim Cardoen CHPC User Services 18 January, 2018 Overview Scripting in Linux What is a script? Why scripting? Scripting languages + syntax

More information

Essential System Administration: Tools And Techniques For Linux And Unix Administration, 3rd Edition PDF

Essential System Administration: Tools And Techniques For Linux And Unix Administration, 3rd Edition PDF Essential System Administration: Tools And Techniques For Linux And Unix Administration, 3rd Edition PDF Essential System Administration,3rd Edition is the definitive guide for Unix system administration,

More information

CS Unix Tools & Scripting

CS Unix Tools & Scripting Cornell University, Spring 2014 1 February 21, 2014 1 Slides evolved from previous versions by Hussam Abu-Libdeh and David Slater Announcement HW 4 is out. Due Friday, February 28, 2014 at 11:59PM. Wrapping

More information

Linux Operating System

Linux Operating System Linux Operating System IT250 Unit 1 Chapters 1, 2, and 3 An Introduction to Linux Linux Operating Systems Wednesday, 9:00 am 1:20 pm Attendance is Mandatory! Each class may begin with a quiz from previous

More information