10 Tips for Writing Efficient Bash Scripts
Feb 02, 2009, 07:04 (2 Talkback[s])
[ Thanks to victorg for this link.
]
"1. Avoid Full Paths to Bash Builtins
"Bash has many builtins that can be used instead of calling
external commands. You should leverage the builtin commands
whenever possible since it avoids calling a subcommand from the
system.
"Since Bash has builtins for some commands found in /bin and
/usr/bin (such as echo), avoid using the full path for these
commands and the builtin will be used."
Complete
Story
Related Stories:
- Enhanced Bash(Jan 31, 2009)
- 10 Awk Tips, Tricks and Pitfalls
(Oct 24, 2008)
- Bash: Redirecting Input from Multiple Files(Oct 16, 2008)
- Tip of the Trade: Bash Command Line Shortcuts(Oct 15, 2008)
- Bash Parameter Expansion(Oct 03, 2008)
- Bash Shell: Take Control of PS1, PS2, PS3, PS4 and PROMPT_COMMAND(Sep 12, 2008)
- Bash Shell PS1: 10 Examples to Make Your Linux Prompt like Angelina Jolie(Sep 12, 2008)