I am currently shell scripting and I would like to know how to make a - option while making a function. When you would execute a command similar to the following:
test -f
Here is the function I am using:
function test()
{
echo $1;
echo $2;
}
How could I add a -t for echo twice option?
Input:
test -t Hello
Output:
Hello
Hello
I am using iTerm and oh-my-zsh.
Thanks, base2101