Imran Ahmed Imran Ahmed - 5 months ago 5x
Bash Question

Provide empty value to an argument in linux command

I have a shell script where I can pass two arguments.

1st argument can be empty or a string
2nd argument can be 0 or 1

Now I want to provide empty value to first argument and 1 to 2nd, how could I call it?

mycommand ___ 1

what should be the value at __


You can just pass an empty string as the first argument:

mycommand '' 1