Transcript
Page 1: Unix Shell Scripting For DBAs

8/7/2019 Unix Shell Scripting For DBAs

http://slidepdf.com/reader/full/unix-shell-scripting-for-dbas 1/5

 

 

 Pacific computer training institute

903 Pavilion Court Suite I, McDonough, GA 30253

Tel: 1-877-405-4554

 

Unix Shell Scripting For DBAs

 

Part A: The Korn Shell Programming Fundamentals

1. Introduction

2. UNIX SHELLS

•  Bourne She ll

•  C a nd TC She ll

•  Korn Shell

•  Bash She ll

3. The Environm ent

•  The / etc / p rofile File

•  The .profile File

•  The ENV File

•  The set –o options

•  The promp ts

•  The primary prompts•  The sec ond ary Prom pt

•  The Sea rch Path

•  The d ot c omma nd

4. The Comm and Line

•  The Exit Sta tus

•  Multiple Comm and s and c om ma nd grouping

•  Cond itiona l execution of com ma nds

•  Comm and s in the Background

•  Co mm and-Line Histo ry

5. Aliases

•  Listing Aliases

•  Creating Aliases

•  Deleting Aliases

6. Job Control

  1

Page 2: Unix Shell Scripting For DBAs

8/7/2019 Unix Shell Scripting For DBAs

http://slidepdf.com/reader/full/unix-shell-scripting-for-dbas 2/5

•  Listing Jobs

•  Stopping current Job

•  Running jobs in background

•  Running jobs in foreground

•  Waiting for Job s

•  Killing Job s

7. Metacharacters

8. Filename Sub stitution

•  The Asterisk

•  The Question Mark

•  The Squa red Brac kets

•  Escaping metal Characters

•  Tilde and Hyphen Expansion

•  New KSH Metal Characters

9. Variables

•  Loc al Variab les

•  Setting a nd Referenc ing Loc al Va riab les

•  The Sc op e of Loc al Va riab les

•  Sett ing Rea d -Only Va riab les

•  Environment Variables

•  Setting Environment

•  Spec ial Environm ent Va riab les

•  Listing Set Variab les

•  Unsett ing Va riab les•  Printing the Values of Va riab les

•  Esc ap e Seq uenc es

•  Variab le Expressions

•  Variab le Expa nsion

•  Variab le Attribute s : The type set Comm and

•  Positiona l Param eters

•  Othe r Spe c ia l Variab les

10. Quoting

•  The Bac kslash

•  The single Q uotes

•  The Double Q uotes

11. Comm and Substitution

12. Standa rd I/O a nd redirec tion

•  Red irec tion and t he Child Shell

  2

Page 3: Unix Shell Scripting For DBAs

8/7/2019 Unix Shell Scripting For DBAs

http://slidepdf.com/reader/full/unix-shell-scripting-for-dbas 3/5

13. Pipes

•  The Here Doc ume nt a nd Red irec ting Input

14. Timing Com ma nds

•  The time Com ma nd

•  The TMOUT va riab le

•  The sleep Comm and

 

Part B:  The Korn Shell Prog ramming

15. Introduction

•  The steps in c rea ting a she ll sc rip t

•  The First Line(shb ang )

•  Comments

•  Executa b le sta tem ents and Korn Shell Constructs

•  Nam ing a nd Storing Sc ripts

•  Using a sc ript a s an a rgum ent to ksh

16. Rea d ing user input

•  Rea d ing a nd File Desc rip to rs

•  Rea d ing throug h Files

17. Arithmetic Operation

•  The intege r type

•  Listing Inte gers

•  Arithmetic O pe rato rs and the let c omm and

18.

 Positioning Param eters and c om ma nd line a rgum ents

•  The set  Positiona l Pa rameters

19. Cond itional Co nstruc ts and Flow Control

•  Testing Exit Sta tus and the $? Variab le

•  The test c om ma nd

•  File Testing with Binary Op era to rs

•  Expression Testing w ith Logica l Op era to rs

•  File Testing with Flags

•  The if Com ma nd

•  Using the Korn Test

•  Korn Test w ith num bers

•  The let c om ma nd and testing num be rs

•  The if/e lse c om ma nd

•  The exit c om ma nd

•  The null Com ma nd

  3

Page 4: Unix Shell Scripting For DBAs

8/7/2019 Unix Shell Scripting For DBAs

http://slidepdf.com/reader/full/unix-shell-scripting-for-dbas 4/5

•  The c ase c omm and

•  The c ase c omma nd a nd the here d oc ument

20. The Loo ping Co mm and

•  The for com ma nd

•  The $* and $@ Variab le and wo rd lists

•  The w hile Com ma nd

•  The until Comm and

•  The select c omm and and Menus

•  The loo p ing c ont rol structures

•  The shift Com ma nd

•  The b rea k Comm and

•  the continue Comm and

•  Nesting Loops and Loop Control

•  I/ O redirec tion a nd Loop s

•  The exec Com ma nd a nd Loop s

•  The IFS and Loops

21. Functions

•  Defining Func tions

•  Listing and Unsetting Functions

•  Loc a l Va riab les and Return Value

•  Exported Func tions

•  Function op tions and the type set c om ma nd

22. Trapping Signals

•  Pseudo or Fake Signa ls•  Resetting Signa ls

•  Ignoring Signals

•  Listing Traps

•  Traps and Func tions

23. Debugging Korn Shell Scripts

•  -n deb ug op tion

•  -x de bug o ption

•  -v deb ug op tion

24. Parsing Co mm and Line Arguments

•  Proc essing Co mm and Line Op tions with g etopts

25. Spec ial Utilities

•  c ut utility

•  sed utility

•  awk utility

  4

Page 5: Unix Shell Scripting For DBAs

8/7/2019 Unix Shell Scripting For DBAs

http://slidepdf.com/reader/full/unix-shell-scripting-for-dbas 5/5

•  tr utility

 

Part C: Orac le Database administration and Shell Sc ripts

1. The Shell wrapper

2. Logging on to SQL*PLUS

3.

 Executing SQL commands within shell scripts

4. Ca lling a SQL sc rip t from she ll sc rip t

5. Informing t he DBA: Send ing em ails and pa ge s

6. Sched uling sc ripts with c ron jobs

7. Com mon Data ba se autom ation tasks

•  Automating ba ckups

•  Che c king Orac le log files for errors

•  Che c king d isk spac e utiliza tion

•  Automa ting da tab ase startups and shutdow ns

•  Autom at ing sta rtup and shutdow n o f listene r and othe r utilities

•  Automa ting d ata ba se m onitoring

 

Rec ommended Books:

1. Anatole Olczak: The Korn She ll (Unix and Linux Program Ma nua l)

(ISBN ISBN-10: 0201675234 , ISBN-13: 978-0201675238)

2. Jon Emmons and Dona ld K. Burleson: Orac le She ll Sc rip ting , Linux and Unix

Program ming for O rac le(ISBN 0977671550)

 

Contac t Information:

Pac ific Systems, Inc .

903 Pavilion Co urt Suite I

Mc Donoug h, GA 30253

1-877-405-4554

  5


Top Related