GNU Compiler Collection (GCC) and GNU C compiler (gcc) tools used to compile programs in Linux.

Slides:



Advertisements
Similar presentations
Introduction to JavaScript
Advertisements

Introduction to Unix – CS 21 Lecture 11. Lecture Overview Shell Programming Variable Discussion Command line parameters Arithmetic Discussion Control.
CS 497C – Introduction to UNIX Lecture 32: - Shell Programming Chin-Chih Chang
CS Lecture 03 Outline Sed and awk from previous lecture Writing simple bash script Assignment 1 discussion 1CS 311 Operating SystemsLecture 03.
Linux+ Guide to Linux Certification, Second Edition
Tutorial 10 Programming with JavaScript
Information Networking Security and Assurance Lab National Chung Cheng University 1 What Linux is? Free Unix Like Open Source Network operating system.
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.
Scripting Languages. Originally, a script was a file containing a sequence of commands that needed to be executed Control structures were added to make.
Guide To UNIX Using Linux Third Edition
Introduction to Unix (CA263) Introduction to Shell Script Programming By Tariq Ibn Aziz.
Introduction to Linux and Shell Scripting Jacob Chan.
Scripting CBIS BASH Scripting Step 1 – Create the bash file. Usually a good idea to end it in.sh file1.sh Step 2 – Using CHMOD make the bash file.
Introduction to Shell Script Programming
BIT 1003 – Presentation 7. Contents GENERATIONS OF LANGUAGES COMPILERS AND INTERPRETERS VIRTUAL MACHINES OBJECT-ORIENTED PROGRAMMING SCRIPTING LANGUAGES.
Week 7 Working with the BASH Shell. Objectives  Redirect the input and output of a command  Identify and manipulate common shell environment variables.
Linux Shell Programming Tutorial 3 ENGR 3950U / CSCI 3020U Operating Systems Instructor: Dr. Kamran Sartipi.
TUTORIAL 10: PROGRAMMING WITH JAVASCRIPT Session 2: What is JavaScript?
Java Programming, Second Edition Chapter One Creating Your First Java Program.
EMT 2390L Lecture 8 Dr. Reyes Reference: The Linux Command Line, W.E. Shotts.
Significance of Scripting Languages for Operating System Administration Vladimir Mateljan Željka Požgaj Krunoslav Peter INFuture2007.
Introduction to Bash Programming Ellen Zhang. Previous three classes What have we learnt so far ?
Linux+ Guide to Linux Certification, Third Edition
Linux Operations and Administration
Shell Scripting AFNOG IX Rabat, Morocco May 2008.
Linux+ Guide to Linux Certification Chapter Eight Working with the BASH Shell.
Guide to Linux Installation and Administration, 2e1 Chapter 11 Using Advanced Administration Techniques.
Writing Scripts Hadi Otrok COEN 346.
UNIX Shell Dr. Tran, Van Hoai
Chapter Six Introduction to Shell Script Programming.
Executable scripts. So far We have made scripts echo hello #for example And called it hello.sh Run it as sh hello.sh This only works from current directory?
Introduction to Perl. What is Perl Perl is an interpreted language. This means you run it through an interpreter, not a compiler. Similar to shell script.
 A PHP script can be placed anywhere in the document.  A PHP script starts with  The default file extension for PHP files is ".php".  A PHP file normally.
Linux A practical introduction. 1)Background and Getting Started Linux is an operating system with multiple providers Red Hat/CentOS (our version) Ubuntu.
Linux+ Guide to Linux Certification, Second Edition
Introduction to Bash Shell. What is Shell? The shell is a command interpreter. It is the layer between the operating system kernel and the user.
Computer Programming A simple example /* HelloWorld: A simple C program */ #include int main (void) { printf (“Hello world!\n”); return.
1 Lecture 7 Introduction to Shell Scripts COP 3353 Introduction to UNIX.
PHP Tutorial. What is PHP PHP is a server scripting language, and a powerful tool for making dynamic and interactive Web pages.
JavaScript and AJAX 2nd Edition Tutorial 1 Programming with JavaScript.
 Prepared by: Eng. Maryam Adel Abdel-Hady
Linux Administration Working with the BASH Shell.
 Prepared by: Eng. Maryam Adel Abdel-Hady
Lab 7 Shell Script Reference: Linux Shell Scripting Tutorial v1.05r3 A Beginner's handbook
 CSC 215 : Procedural Programming with C C Compilers.
Bash Scripting CIRC Summer School 2016 Baowei Liu CIRC Summer School 2016 Baowei Liu.
CS 350 Lecture 3 UNIX/Linux Shells by İlker Korkmaz and Kaya Oğuz.
Foreground and background processes
CIRC Winter Boot Camp 2017 Baowei Liu
Department of Computer Engineering
Prepared by: Eng. Maryam Adel Abdel-Hady
Scripting Languages Info derived largely from Programming Language Pragmatics, by Michael Scott.
Introduction Python is an interpreted, object-oriented and high-level programming language, which is different from a compiled one like C/C++/Java. Its.
By Jonathan Rinfret CREATING A BASH SCRIPT By Jonathan Rinfret
The Linux Operating System
Lecture 11 bash scripting overview c programming overview moving data between c and bash memory and pointers.
Bash 101 Intro to Shell Scripting; Lightning
CSE 303 Concepts and Tools for Software Development
Download LX0-104 Exam Dumps Questions & Answers - LX0-104 Braindumps Dumps4download
Henning Schulzrinne Advanced Programming
The Linux Command Line Chapter 24
Algorithms Take a look at the worksheet. What do we already know, and what will we have to learn in this term?
More advanced BASH usage
Python 19 Mr. Husch.
Tutorial 10: Programming with javascript
Lab 4: Introduction to Scripting
Lab 7 Shell Script Reference:
CST8177 Scripting 2: What?.
Python 19 Mr. Husch.
The Linux Command Line Chapter 24
Presentation transcript:

GNU Compiler Collection (GCC) and GNU C compiler (gcc) tools used to compile programs in Linux

Hello World! program compilation in C #include int main() { printf("hello world!\n"); }

PERL, Python, and bash—script interpreters in Linux Python is for rapid GUI development PERL is for complex jobs and Web pages bash is for everyday, general-purpose scripting.

Control structures used to develop scripting logic If...Then...Else statements Case statements For loops While loops table on page 907

BASH Scripting Shell scripting provides a way to automate everyday tasks into much simpler commands. –For example, to add 200 users would require running the useradd command 200 times. The first line of a script identifies the shell or interpreter used to run this script. – Linux uses BASH as the default shell so #! /bin/bash is the first line of BASH scripts.

Any line with a # sign is a comment line. –Use comments to document what a script is doing. BASH scripting is basically taking several commands into one file in the sequence you wish them executed.

The read statement reads the value of a variable from stdin (standard input). –It fetches input from the keyboard or a source redirected to it. read a will read a single value from stdin read a b c will read multiple values on a single line from stdin. You don’t have to declare variables, just use them –VAR1 = 2 –VAR2 = “Hello, World”

Any arguments to the script are numbered $1, $2, $3, etc and used in the script by their numbers The echo line displays values. –It can display text: echo “Hello, world” –It can display the contents of a variable: echo VAR1

pg905

Lab5.2

Pg911

Pg 929

Lab 5.4 pg919 ex.

Pg 921 Lab 5.5

The Read command the Read command will be used with the While loop to take input from a file. This requires the use of the standard input redirector. Pg 956