Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
bash [2009/01/13 14:19] a |
bash [2009/05/25 00:35] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | If you just want to find out what's new in a directory: | + | ===== .barshrc |
- | + | ||
- | | + | |
- | + | ||
- | **.barshrc** | + | |
<code |f .barshrc> | <code |f .barshrc> | ||
Line 34: | Line 30: | ||
alias system=" | alias system=" | ||
+ | |||
+ | **Colored prompt** | ||
+ | <code bash|> | ||
+ | PS1=' | ||
+ | </ | ||
+ | |||
+ | ==== Adds date/time to history ==== | ||
+ | #vi $HOME/ | ||
+ | export HISTTIMEFORMAT=”%h/ | ||
+ | |||
+ | ==== If you just want to find out what's new in a directory ==== | ||
+ | |||
+ | | ||
===== Scripts ===== | ===== Scripts ===== | ||
Line 50: | Line 59: | ||
done | done | ||
</ | </ | ||
+ | |||
+ | ===== Bash misc stuff ===== | ||
+ | ==== $RANDOM not random at all ==== | ||
+ | |||
+ | instead of $RANDOM use .. | ||
+ | SEED=$(head -c4 / | ||
+ | ((N=SEED%N)) | ||
+ | or | ||
+ | |||
+ | SEED=$(head -1 / | ||
+ | ((N=SEED%N)) | ||
+ | |||
+ | |||