Skip to main content
1 of 3
Jerry
  • 161
  • 1
  • 2
  • 9

How to build hidden features in shell scripting, which are activated by user input?

I want to build an extra feature in my script, which only runs if the user tells it to. Should I just have an extra argument to my script to determine if something runs or not? E.g. I have the program tree.sh which takes a gene input. E.g. ./tree.sh AIFM1. But I want to have an extra feature that visualises the gene. Do I just have if $2 is a specific command then run the code for the extra feature? Is there a better way of implementing this?

Jerry
  • 161
  • 1
  • 2
  • 9