Shell scripting for penetration testing and information security

Morning members

Shell scripting being an important aspects of Linux system/server administration makes it a must learn for all aspiring Linux engineers and System Administrators.
As security is always the main concern about providing services to many users so as to maintain availability, integrity and confidentiality of services on a Linus system.
As a shell programmer, what steps can i follow to develop scripts for penetration testing and general information security?