Shell Traps

by Geethalakshmi 2010-09-17 13:07:49

Shell Traps


Sharp shell programmers should take note of the following:

* The backtick operator does variable interpretation without regard to the presence of single quotes in the command.
* The backtick operator does no translation of the return value, unlike csh.
* Shells (especially csh) do several levels of substitution on each command line. Perl does substitution only in certain constructs such as double quotes, backticks, angle brackets and search patterns.
* Shells interpret scripts a little bit at a time. Perl compiles the whole program before executing it.
* The arguments are available via `@ARGV', not `$1', `$2', etc.
* The environment is not automatically made available as variables.

Tagged in:

1036
like
0
dislike
0
mail
flag

You must LOGIN to add comments