- Notes on the Bourne (sh) and Bash (bash) shells
- Debugging hints.
- How test [ ] is evaluated.
- Special shell characters - reference sheet.
- freq examples (the next four items as one document):
- Output words in order of frequency with counts.
- Output the words in order of frequency with no count.
- Output the ten most frequent words with counts.
- Output the n-th to m-th most frequent words with counts.
- A new apropos illustrating grep and for.
- A simple filter to reverse a file.
- Signal handling and primitive argument handling example.
- Argument handling using getopts.
- How to enclose stdin in canned input.
- All files on PATH matching a pattern: Which.
- Looping a specific number of times.
- Another looping example: deliver a file in sections.
- A wrapper script for a system utility: Converting files from dos to unix using dos2unix by removing carriage returns.
- System scripts and system admin examples:
- Some system scripts: vold and cron startup and shutdown.
- See /usr/bin/true.
- Copy over a command file for system startup using another command file localapps.
- Check for presence of important system processes: NIS+ check.
- Configure system for new hardware:
- Generate the windex database used by man and apropos: windex command file
- Script front ends.
- dtksh example script: Find, a graphics user interface to the find utility. The files Find.sticky andFind.help are also needed. This example is taken from the CDE Desktop KornShell User's Guide chapter of the Solaris Common Desktop Environment AnswerBook. The example has been modified for use in a Solaris 2.x environment.
- A little puzzle: What's wrong with this bad script? Solution.
- How to input a single character.
- How to write a portable echo.
- Using ed to alter files in place.
- Some windowing stuff: Screen size and xterm resize.
- Various odds and ends.
Tuesday, May 10, 2011
Shell Examples
Shell Examples
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment