top of page
Writer's pictureTravis Martin

Bash Script Command-line tool template

Quick post on how I start my shell scripts. I tend to follow a similar pattern when developing any script to automate any tasks from running all my scan tools, to a simple building my recon folder structure.


Here is my code template you can copy and paste this and it should work standalone.

Output:

Notice that when I run the script with no flags it outputs the info message, when I add the -s flag the output is hidden but the message still gets sent into the log file.

Summary:

This code is pretty simple, if anything seems confusing please leave a comment below and I will explain into more detail your questions and doubts. If you want to see me extend this "Template" please let me know what you want me to build I will attempt to do so.

423 views0 comments

Recent Posts

See All

Java Min and Max heap

Just posting some code on building a min and max heap, I will use an abstract class since both of these classes will contain similar...

Comments


bottom of page