Bash for Everyone
I have been using the bash shell increasingly on my macbook pro to get stuff done. I haven't used the power of the bash shell extensively since college. Here is a fun Bash kata.
For Fun (mac only)
> say -v zarvox 'All your base belong to us'
Who am I?
> whoami
Am I running Bash?
> echo $BASH
Really... what is Bash?
> whatis bash
Okay... where is Bash?
> whereis bash
Where am I?
> pwd
Cursor
Bash is designed so your hands stay on the keyboard. You can move the prompt around without using the arrow keys.
ctrl + a - begining of line
ctrl + e - 'E'nd of line
ctrl + f - 'F'orward
ctrl + b - 'B'ack
Files and Directories
Make a folder called badguys
> mkdir badguys
Change to folder
> cd badguys
Create a text file
> touch mbison.txt
Add some text to the file
> echo 'Leader of the bad guys' > mbison.txt
See the contents of the file
> cat mbison.txt
Create several bad guys at once
> touch sagat.txt zangief.txt akuma.txt
Add more descriptions
> echo 'thai kick boxer' > sagat.txt
> echo 'russian wrestler' > zangief.txt
Searching for Text
> grep thai