How to check for the-t flag in bash?

1
Clemens Bogan asked a question: How to check for the-t flag in bash?
Asked By: Clemens Bogan
Date created: Wed, Apr 7, 2021 4:34 PM
Date updated: Sat, Oct 1, 2022 2:11 AM

Content

Top best answers to the question «How to check for the-t flag in bash»

  • Firstly, in my script I want to check to see if the script has been run with the -t flag. For example if it has been run without the flag like this I want it to error: Secondly, assuming there is a -t flag, I want to grab the value and store it in a variable that I can use in my script for example like this:

Your Answer