Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
command-line_ninjary [2013/02/16 01:52] – ishivvers | command-line_ninjary [2013/04/01 14:59] (current) – [Navigation] c.axen | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ==== Command-line Ninjary GSPS 2013 ==== | + | ====== Command-line Ninjary GSPS 2013 ====== |
This is meant to be a quick reference guide to command-line usage for those of us | This is meant to be a quick reference guide to command-line usage for those of us | ||
who have the basics down, but aren't yet true ninjas. | who have the basics down, but aren't yet true ninjas. | ||
- | or quick examples! | + | or quick examples! |
+ | so learn to love it and use it well. Note: this page was written for '' | ||
+ | but much of this stuff should translate to '' | ||
------------------------------------ | ------------------------------------ | ||
- | === Navigation === | + | ==== Navigation ==== |
+ | General notes about navigation commands: First, " | ||
* '' | * '' | ||
* '' | * '' | ||
- | * '' | + | * '' |
* '' | * '' | ||
* '' | * '' | ||
* ('' | * ('' | ||
+ | * Ctrl-f: move forward one character | ||
+ | * Ctrl-b: move backward one character | ||
* use backslash '' | * use backslash '' | ||
| | ||
Line 49: | Line 54: | ||
- | === Really Useful Built-ins === | + | ==== Really Useful Built-ins |
* '' | * '' | ||
Line 149: | Line 154: | ||
| | ||
* '' | * '' | ||
- | * basic usages are powerful, learn more [[http:// | + | * basic usages are powerful, learn more [[http:// |
* '' | * '' | ||
* '' | * '' | ||
Line 162: | Line 167: | ||
- | == Looping | + | ==== Loops & Functions ==== |
=== Variables === | === Variables === | ||
Line 239: | Line 244: | ||
Some examples: | Some examples: | ||
- | | + | function speak () { |
- | echo here are all $# arguments: $@ | + | |
- | echo here is argument 1: $1 | + | |
- | echo here is argument 3: $3 | + | |
} | } | ||
function killme () { | function killme () { | ||
- | ps -e | grep $1 | awk ' | + | |
- | echo $1 is dead | + | |
} | } | ||
Line 255: | Line 260: | ||
} | } | ||
- | == .profile or .bashrc | + | |
+ | == .profile or .bashrc == | ||
There are a set of system files in your home directory that are executed every time | There are a set of system files in your home directory that are executed every time | ||
a terminal is opened - use those to define aliases, functions, or variables | a terminal is opened - use those to define aliases, functions, or variables | ||
you want always available. | you want always available. | ||
- |