Use the command-line shell interactively
About using the command line interactively
Use Terminal shortcuts
Redirect input and output
Use environment variables