Settings

Theme

Ask HN: How to be a good bash script writer?

2 points by KRuchan 10 years ago · 1 comment · 1 min read


Assume elementary knowledge - pipes, redirection, awk/sed/cut/standard Unix tools.

How does one get to writing scripts that are -

(a) portable

(b) easy to debug

(c) clean and easy to modify

Where can I find good sample scripts?

benj2240 10 years ago

You might like the Advanced Bash Scripting Guide. To quote:

"This tutorial assumes no previous knowledge of scripting or programming, yet progresses rapidly toward an intermediate/advanced level of instruction... It serves as a textbook, a manual for self-study, and as a reference and source of knowledge on shell scripting techniques"

http://tldp.org/LDP/abs/html/

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection