Linux Programming: Difference between revisions

From 太極
Jump to navigation Jump to search
(Created page with "= Shell Programming = == Variables == == Conditions == == Control Structures == == Functions == == Commands == == Command Execution == == Debugging Scripts == = Working with ...")
 
Line 1: Line 1:
= Shell Programming =
= Shell Programming =
== Variables ==
== Variables ==
<pre>
food=Banana
echo $food
food="Apple"
echo $food
$HOME
$PATH
$0 -- name of the shell script
$# -- number of parameters passed
$$ process ID of the shell script, often used inside a script for generating unique temp filenames
$1, $2, .... -- parameters given to the script
$* -- list of all the parameters, in a single variable
$@ -- subtle variation on $*
</pre>
== Conditions ==
== Conditions ==
== Control Structures ==
== Control Structures ==

Revision as of 09:59, 21 April 2014

Shell Programming

Variables

food=Banana
echo $food
food="Apple"
echo $food
$HOME
$PATH
$0 -- name of the shell script
$# -- number of parameters passed
$$ process ID of the shell script, often used inside a script for generating unique temp filenames
$1, $2, .... -- parameters given to the script
$* -- list of all the parameters, in a single variable
$@ -- subtle variation on $*

Conditions

Control Structures

Functions

Commands

Command Execution

Debugging Scripts

Working with Files

UNIX environment

Logging

Resources and Limits

Curses

A technique between command line and full GUI.

Example: vi.

Data Management

Development Tools

make and Makefiles

Writing a Manual Page

Distributing Software

The patch Program

Debugging

gdb

Processes and Signals

POSIX threads

Inter-process Communication: Pipes

Sockets