UNIX Editors
- vi/vim - Designed for programming, great for many things
- Run vim tutor for a tutorial
- emacs - More WYSIWYG style
- Do ^H t in the editor for a tutorial
- Anything else is wrong
The Idea of Scripts
- A shell script is a sequence of shell commands
- Lines starting with # are comments
- $N is argument N to the script (shorthand for
$argv[N])
- Two ways to run scripts
- source <script file>
- Add a line that specifies which shell should be used to execute
the commands on its first line, with a leading #!,
e.g., #!/bin/tcsh.
Make the file executable (with chmod +x your_file_name).
- LookingForInts
- Sample tcsh script
- Redirection
- Scripts that uses some redirection of IO