CSCI The UNIX System Shell Substitution and Sequences

Slides:



Advertisements
Similar presentations
CST8177 sed The Stream Editor. The original editor for Unix was called ed, short for editor. By today's standards, ed was very primitive. Soon, sed was.
Advertisements

Tr. translate characters - standard input. tr x y < namesAndNumbers.txt translated from x to y in file namesAndNumbers.txt tr can be used to produce more.
More Shell Programming Software Tools. Slide 2 Keyword Shell Variables l The shell sets keyword shell variables. You can use (and change) them. HOME The.
Using Linux Commands Lab 4 1. Create empty files To create an empty file $ touch apple banana grape grapefruit watermelon $ ls -l Using file-matching.
Chapter 6 Dealing with quotes. Dealing with Quotes and slashes grep Susan phonebook grep Susan Goldberg phonebook  results in an error  grep ‘Susan.
Find Command Characteristics –Locate files descending from multiple starting points –Employs regular expressions Examples On entire system: >find / -name.
Shell Basics CS465 - Unix. Shell Basics Shells provide: –Command interpretation –Multiple commands on a single line –Expansion of wildcard filenames –Redirection.
23-Jun-15Advanced Programming Spring 2002 bash Henning Schulzrinne Department of Computer Science Columbia University.
CS Lecture 04 Outline Change your shell Sed and awk Tricks with Bash scripts Assignment 1 discussion 1CS 311 Operating SystemsLecture 04.
CS 497C – Introduction to UNIX Lecture 20: - The Shell Chin-Chih Chang
The UNIX Shells 1. What is a Unix shell? 2. A few common shells in the Unix & Linux. A. Bourne shell B. Korn shell C. C shell D. Bash-the default shell.
Copyright © Clifford Neuman - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE USC CSci599 Trusted Computing - Lecture Fourteen.
Introduction to UNIX GPS Processing and Analysis with GAMIT/GLOBK/TRACK T. Herring, R. King. M. Floyd – MIT UNAVCO, Boulder - July 8-12, 2013 Directory.
QUOTATION This chapter teaches you about a unique feature of the shell programming language: the way it interprets quote characters. Basically, the shell.
Shell Script Examples.
2 $ command Command Line Options ls –a –l hello hi Command Arguments.
CTEC 1863 – Operating Systems Shell Scripting. CTEC F2 Overview How shell works Command line parameters –Shift command Variables –Including.
1 Lecture 2 Working with Files and Directories COP 3344 Introduction to UNIX.
CPS120: Introduction to Computer Science Operating Systems Nell Dale John Lewis.
Unix Shells Based on Glass & Abels’ Book CS240 Computer Science II.
Course materials may not be reproduced in whole or in part without the prior written permission of IBM. 5.1 © Copyright IBM Corporation 2008 Unit 8 Shell.
Shell Features CSCI N321 – System and Network Administration Copyright © 2000, 2005 by Scott Orr and the Trustees of Indiana University.
UNIX and Shell Programming (06CS36) Unit 1 Continued… Shrinivas R. Mangalwede Department of Computer Science and Engineering K.L.S. Gogte Institute of.
Additional UNIX Commands. 222 Lecture Overview  Multiple commands and job control  More useful UNIX utilities.
Introduction to Linux OS (IV) AUBG ICoSCIS Team Prof. Volin Karagiozov March, 09 – 10, 2013 SWU, Blagoevgrad.
1 Shell Scripting (C shell) SungHo Maeung 10/27/2000 Tutorial section Computer Science Lab.
Essential Shell Programming by Prof. Shylaja S S Head of the Dept. Dept. of Information Science & Engineering, P.E.S Institute of Technology, Bangalore
UNIX Shell Script (1) Dr. Tran, Van Hoai Faculty of Computer Science and Engineering HCMC Uni. of Technology
Scripting Languages Course 2 Diana Trandab ă ț Master in Computational Linguistics - 1 st year
UNIX Commands. Why UNIX Commands Are Noninteractive Command may take input from the output of another command (filters). May be scheduled to run at specific.
Awk Dr. Tran, Van Hoai Faculty of Computer Science and Engineering HCMC Uni. of Technology
ICS 431 – Operating System. a command-line interpreter. a program that interprets commands and acts as an intermediary between the user and the inner.
Shell Advanced Features. Module 8 Shell Advanced Features ♦ Introduction In Linux systems, the shells are often referred to as command line interfaces.
LIN Unix Lecture 5 Unix Shell Scripts. LIN Command Coordination ; && || command1 ; command2 Interpretation: Do command 1. Then do command.
CSCI The UNIX System Shell Data Handling: Redirection and Piping
Introduction to Unix (CA263) Quotes By Tariq Ibn Aziz.
CSCI 330 UNIX and Network Programming Unit IV Shell, Part 2.
Environment After log in into the system, a copy of the shell is given to the user Shell maintains an environment which is distinct from one user to another.
CSCI 330 UNIX and Network Programming Unit IV Shell, Part 2.
CSCI 330 UNIX and Network Programming Unit III Shell, Part 1.
Basic Unix Commands & GCC Saurav Karmakar Spring 2007.
CS240A:A sample LDL++ Session Carlo Zaniolo Department of Computer Science University of California, Los Angeles December, 2001.
Configuration your environment Many user-configurable Unix programs (such as your shell) read configuration files when they start up. These configuration.
CS 403: Programming Languages Lecture 20 Fall 2003 Department of Computer Science University of Alabama Joel Jones.
Chapter 15 Introductory Bourne Shell Programming.
1 UNIX Operating Systems II Part 2: Shell Scripting Instructor: Stan Isaacs.
Shell scripts – part 1 Cs 302. Shell scripts  What is Shell Script? “Shell Script is series of command written in plain text file. “  Why to Write Shell.
UNIX To do work for the class, you will be using the Unix operating system. Once connected to the system, you will be presented with a login screen. Once.
CSCI The UNIX System sed - Stream Editor
Shell Features CSCI N321 – System and Network Administration
Bash Introduction (adapted from chapters 1 and 2 of bash Cookbook by Albing, Vossing, & Newham) CPTE 440 John Beckett.
CST8177 sed The Stream Editor.
The UNIX Shell Learning Objectives:
Characters and Strings
Introduction to C Language
Shell Scripting March 1st, 2004 Class Meeting 7.
Introduction to UNIX Directory structure and navigation
John Carelli, Instructor Kutztown University
CSCI The UNIX System Shell History and Directory Stacks
CSCI The UNIX System Shell Startup and Variables
CSCI N207 Data Analysis Using Spreadsheet
UNIX Reference Sheets CSE 2031 Fall 2010.
CSCI The UNIX System Shell: Aliases
Linux Shell Script Programming
Chapter 3 The UNIX Shells
CSCI The UNIX System Editing files
CSC 4630 Meeting 4 January 29, 2007.
Characters and Strings
Chapter 3: The Shell.
Essential Shell Programming
Presentation transcript:

CSCI 330 - The UNIX System Shell Substitution and Sequences NIU - Department of Computer Science

Command Substitution command surrounded by back quotes ` The C Shell Command Substitution command surrounded by back quotes ` is replaced by its standard output newlines in the output are replaced by spaces Example: % echo `date` % ls -l `which passwd` CSCI 330 - The UNIX System Copyright Department of Computer Science, Northern Illinois University, 2005

Command Sequence allows series of commands all at once The C Shell Command Sequence allows series of commands all at once commands are separated by a semicolon ; Example: % date; pwd; ls CSCI 330 - The UNIX System Copyright Department of Computer Science, Northern Illinois University, 2005