Linux Programming: Difference between revisions
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.