I'm a new linux learner, and I don't know why we use a hyphen for parameters of Shell. As I know, $1, $2 ... are the first, second parameter.
So my question is:
When do we need/needn't a hyphen for a parameter?
For me, when I write my own shell scripts, I always pass parameters without hyphen. For example,
myShell.sh param1 param2 param3
ls -l myDir
-) is used to differentiate the options with other arguments.
I am using your example
ls -l myDir to explain. How will you differentiate whether
l is option to output long lists or you want to list a file named