19.03.2015 Views

Unix Tutorial

test

test

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Extended Shell Scripts: ............................................................................ 63<br />

<strong>Unix</strong>- Using Variables............................................................. 64<br />

Variable Names: ....................................................................................... 64<br />

Defining Variables: ................................................................................... 64<br />

Accessing Values: .................................................................................... 65<br />

Read-only Variables: ................................................................................ 65<br />

Unsetting Variables: ................................................................................. 65<br />

Variable Types: ........................................................................................ 66<br />

<strong>Unix</strong>-Special Variables ........................................................... 67<br />

Command-Line Arguments: ..................................................................... 68<br />

Special Parameters $* and $@: ............................................................... 68<br />

Exit Status: ............................................................................................... 69<br />

<strong>Unix</strong> – Using Arrays ............................................................... 70<br />

Defining Array Values:.............................................................................. 70<br />

Accessing Array Values: .......................................................................... 71<br />

<strong>Unix</strong> - Basic Operators .......................................................... 72<br />

Arithmetic Operators: ............................................................................... 73<br />

Relational Operators: ............................................................................... 74<br />

Boolean Operators: .................................................................................. 76<br />

Example: .................................................................................................. 76<br />

String Operators: ...................................................................................... 77<br />

Example: .................................................................................................. 78<br />

File Test Operators: ................................................................................. 79<br />

Example: .................................................................................................. 80<br />

C Shell Operators: .................................................................................... 81<br />

Arithmatic and Logical Operators: ............................................................ 81<br />

File Test Operators: ................................................................................. 82<br />

Korn Shell Operators: ............................................................................... 83<br />

Arithmatic and Logical Operators: ............................................................ 83<br />

File Test Operators: ................................................................................. 83<br />

<strong>Unix</strong> – Decision Making .......................................................... 85<br />

The if...else statements: ........................................................................... 85<br />

if...fi statement .......................................................................................... 85<br />

Syntax: ..................................................................................................... 85<br />

Example: .................................................................................................. 86<br />

if...else...fi statement ................................................................................ 86<br />

Syntax: ..................................................................................................... 86<br />

Example: .................................................................................................. 86<br />

if...elif...else...fi statement ......................................................................... 87<br />

TUTORIALS POINT<br />

Simply Easy Learning

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!