1. auto-complete features in all shells:
bash: TAB or double TAB
cash: escape
korn: escape \ or double escape (depends on EDITOR var setting, either vi or emacs)
2. accessing previous command arguments from shell
$! access the last argument of the last command entry
!:1 or another number can access the last command argument at the position starting from 1
3. pushd and popd creates a stack of file locations that can be accessed without using cd command. it can also manipulate the stack, rotating its order with +i or -i where i is the rotation number to rotate, + puts the frontmost to the back, - puts the backmost to the front
4. curl command can be used to retrieve web information, use -s to ignore processing output, use -o to download any file from the internet
5. name matching special characters:
^ -> matching anything to the starting of line as in ^A
? -> matching anything at the end of the line A?
[] -> matching any character within the bracket, use - for indicating range
[^]-> matching any character except for those within the bracket
. -> match a single character of any value except for EOF
* -> match 0 or more preceding characters to expression
\{x,y\} -> match to x to y occurence of the preceding
\{x\} -> match to exactly x occurence of the preceding
\{x,\} -> match to x or more occurence of the preceding
6. some awk example (more examples)
$ cat text
testing the awk command
$ awk '{ i = length($0); print i }' text
23
$ awk '{ i = index($0,”ing”); print i}' text
5
$ awk 'BEGIN { i = 1 } { n = split($0,a," "); while (i <= n) {print a[i]; i++;} }' text
(summarized from
here)