Skip to main content
Formatting
Source Link
AdminBee
  • 23.6k
  • 25
  • 55
  • 77

I want to build an extra feature in my script, which only runs if the user tells it to. E

E.g. I have the program tree.shtree.sh which takes a gene input. E.g. ./tree.sh AIFM1. But

./tree.sh AIFM1

But I want to have an extra feature that visualises the gene. I

I want to use flags to trigger the extra features in the shell script. I found this inin the link: https://jonalmeida.com/posts/2013/05/26/different-ways-to-implement-flags-in-bash/ I. I would like to use flags, however the first argument is to search for something in a website (which could pretty much be anything). Meaning I need the use of cases, but one of the cases needs to account for anything else that wasn't specified in the cases. (e.g. like an else statement). How do I resolve this issue, without importing any special packages?

I want to build an extra feature in my script, which only runs if the user tells it to. 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. I want to use flags to trigger the extra features in the shell script. I found this in the link: https://jonalmeida.com/posts/2013/05/26/different-ways-to-implement-flags-in-bash/ I would like to use flags, however the first argument is to search for something in a website (which could pretty much be anything). Meaning I need the use of cases, but one of the cases needs to account for anything else that wasn't specified in the cases. (e.g. like an else statement). How do I resolve this issue, without importing any special packages?

I want to build an extra feature in my script, which only runs if the user tells it to.

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.

I want to use flags to trigger the extra features in the shell script. I found this in the link: https://jonalmeida.com/posts/2013/05/26/different-ways-to-implement-flags-in-bash/. I would like to use flags, however the first argument is to search for something in a website (which could pretty much be anything). Meaning I need the use of cases, but one of the cases needs to account for anything else that wasn't specified in the cases. (e.g. like an else statement). How do I resolve this issue, without importing any special packages?

added 286 characters in body; edited title
Source Link
Jerry
  • 161
  • 1
  • 2
  • 9

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

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 want to use flags to trigger the extra features in the shell script. I just have if $2found this in the link: https://jonalmeida.com/posts/2013/05/26/different-ways-to-implement-flags-in-bash/ I would like to use flags, however the first argument is to search for something in a specific command then runwebsite (which could pretty much be anything). Meaning I need the codeuse of cases, but one of the cases needs to account for anything else that wasn't specified in the extra feature?cases. (e.g. like an else statement). Is there a better way of implementingHow do I resolve this issue, without importing any special packages?

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?

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

I want to build an extra feature in my script, which only runs if the user tells it to. 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. I want to use flags to trigger the extra features in the shell script. I found this in the link: https://jonalmeida.com/posts/2013/05/26/different-ways-to-implement-flags-in-bash/ I would like to use flags, however the first argument is to search for something in a website (which could pretty much be anything). Meaning I need the use of cases, but one of the cases needs to account for anything else that wasn't specified in the cases. (e.g. like an else statement). How do I resolve this issue, without importing any special packages?

Post Undeleted by Jerry
Post Deleted by Jerry
Source Link
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?