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.

Example: ................................................................................................ 101<br />

<strong>Unix</strong> – Quoting Mechanisms ................................................ 102<br />

The Metacharacters ............................................................. 102<br />

Example: ................................................................................................ 102<br />

The Single Quotes: ................................................................................ 103<br />

The Double Quotes: ............................................................................... 104<br />

The Back Quotes: .................................................................................. 104<br />

Syntax: ................................................................................................... 104<br />

Example: ................................................................................................ 105<br />

Example: ................................................................................................ 105<br />

<strong>Unix</strong> – IO Redirections ......................................................... 106<br />

Output Redirection: ................................................................................ 106<br />

Input Redirection: ................................................................................... 107<br />

Here Document: ..................................................................................... 107<br />

Discard the output: ................................................................................. 108<br />

Redirection Commands: ......................................................................... 109<br />

<strong>Unix</strong> – Shell Functions ......................................................... 110<br />

Creating Functions: ................................................................................ 110<br />

Example: ................................................................................................ 110<br />

Pass Parameters to a Function: ............................................................. 111<br />

Returning Values from Functions: .......................................................... 111<br />

Example: ................................................................................................ 111<br />

Nested Functions: .................................................................................. 112<br />

Function Call from Prompt: ..................................................................... 112<br />

<strong>Unix</strong> - Manpage Help ........................................................... 114<br />

Syntax: ................................................................................................... 114<br />

Example: ................................................................................................ 114<br />

Man Page Sections: ............................................................................... 114<br />

Useful Shell Commands: ........................................................................ 115<br />

<strong>Unix</strong> - Regular Expressions ................................................. 116<br />

Invoking sed: .......................................................................................... 116<br />

The sed General Syntax: ........................................................................ 116<br />

Deleting All Lines with sed: .................................................................... 117<br />

The sed Addresses: ............................................................................... 117<br />

The sed Address Ranges: ...................................................................... 117<br />

The Substitution Command: ................................................................... 118<br />

Substitution Flags: .................................................................................. 119<br />

Using an Alternative String Separator: ................................................... 119<br />

Replacing with Empty Space: ................................................................. 119<br />

TUTORIALS POINT<br />

Simply Easy Learning

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

Saved successfully!

Ooh no, something went wrong!