GNU Compiler Collection GCC and GNU C compiler
- Slides: 20
GNU Compiler Collection (GCC) and GNU C compiler (gcc) • tools used to compile programs in Linux
Hello World! program compilation in C • • • #include <stdio. h> 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 – VAR 1 = 2 – VAR 2 = “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 VAR 1
pg 905
Lab 5. 2
Pg 911
Pg 929
Lab 5. 4 pg 919 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
- Gnu gcc is a: cross compiler assembler linker loader
- Lex yacc example
- Cross compiler in compiler design
- Trace based collection in compiler design
- Landsat collection 1 vs collection 2
- Documents against payment
- Command gcc
- Gcc logo
- Gcc
- Glendale community college rn program
- Gcc -z execstack
- Tender definition
- Gcc e gcu corrispondono
- Glendale community college dual enrollment
- Gcc freedom of movement
- Gcc
- Flex gcc
- Gcc stdio.h
- Code
- Ibm power linux
- Glendale college transcripts