What is the meaning of set -- $PATH
in shell script?
Is this the same as set
echo "$PATH"
?
What is the significance of --
here?
Asked
Active
Viewed 31 times
0

Esha
- 183
-
https://unix.stackexchange.com/a/295492/30851 – frostschutz Apr 16 '20 at 08:54
-
This is NOT a duplicate. The referenced thread states the usual usage of this arg. It does not answer this question precisely. The bash set command has a specific defined use for both -- and - : The -- unsets all existing positional arguments. The - signals the end of options to set, and the beginning of options to be changed in the shell as a whole. – Paul_Pedant Apr 16 '20 at 10:13