O'Reilly logo

Solaris™ 8 Advanced System Administrator's Guide, Third Edition by Janice Winsor

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Reference Tables

This chapter contains tables of syntax elements for all three shells and examples of shell scripts.

Environment Files

Description Bourne Korn C
Read at login. .profile .profile .login
Read at invocation of shell.  Any file specified in .profile with ENV=file. By convention, file is usually .kshrc .cshrc

First Line of Script

Shell Syntax
Bourne #!/bin/sh
Korn #!/bin/ksh
C #!/bin/csh -f

Korn Shell Path Operators

Operator Description
${variable# pattern} Delete the shortest part at the beginning of the variable that matches the pattern and return the rest.
${variable## pattern} Delete the longest part at the beginning of the variable that matches the pattern and return the rest.
${variable% pattern} Delete the shortest part at ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required