This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| howto:bashprofile [2023/02/16 21:36] – created kamaradski | howto:bashprofile [2023/02/16 23:25] (current) – [defining aliasess] kamaradski | ||
|---|---|---|---|
| Line 20: | Line 20: | ||
| export password=somethingSecret123 | export password=somethingSecret123 | ||
| export APIkey = 12345-abcde-12345-ABCDE-00100 | export APIkey = 12345-abcde-12345-ABCDE-00100 | ||
| + | |||
| + | # NOTE: the above is an example, your bash_profile is NOT a safe place to keep passwords. | ||
| </ | </ | ||
| Line 42: | Line 44: | ||
| </ | </ | ||
| - | This creates an alias "ll" | + | This creates an alias '' |
| <code bash> | <code bash> | ||
| Line 53: | Line 55: | ||
| alias fgrep=' | alias fgrep=' | ||
| alias egrep=' | alias egrep=' | ||
| + | alias somewebsite=' | ||
| ### print current time in UTC | ### print current time in UTC | ||
| Line 91: | Line 94: | ||
| You can find more information about the syntax and available codes for the Bash Prompt Escape Sequences in the Bash manual, which is available on most Unix-based systems by typing '' | You can find more information about the syntax and available codes for the Bash Prompt Escape Sequences in the Bash manual, which is available on most Unix-based systems by typing '' | ||
| + | |||
| + | |||
| + | ==== Functions configuration ==== | ||
| + | |||
| + | If you spend a lot of time on the CLI you can use it to create handy functions like for example go a google web search from the command line as such: | ||
| + | |||
| + | <code bash> | ||
| + | ### terminal shortcuts | ||
| + | function gg() { open https:// | ||
| + | function google() { open https:// | ||
| + | </ | ||
| + | |||
| + | Calling the following command would then open a browser tab with the corresponding google-search: | ||
| + | |||
| + | ==== tuxsay ==== | ||
| + | |||
| + | This should be installed on any computer where the terminal is used regularly, for obvious reasons (cowsay with tux layout): | ||
| + | |||
| + | <code bash> | ||
| + | ### tuxsay/ | ||
| + | # | ||
| + | fortune -s computers | cowsay -f tux | ||
| + | </ | ||
| + | |||
| + | {{: | ||