Not exactly. To the shell that combination of characters means nothing special.Indy'spup wrote:Does the Prefix -- used often with a command/function have any specific meaning in bash?
"--" is an argument which is meaningful to most commands. It signals the end of options on that command line, thereby indicating that what follows is to be treated as something other than an option.
For example, suppose you (either intentionally or accidently) believe you had created a file named with the two characters "-u". You might think that the command "ls -u" will indicate whether or not that particular file exists. But you will be in for a surprise.
The "ls" command can take many optional arguments. One such argument is "-u" which tells it to list filenames along with the last time each was accessed. So your command "ls -u" will list all files in the current directory and show their most recent time of access; and it won't list just the one filename you were hoping to see. (Though somewhere in the long listing you will find that file, if it exists.)
To make it clear to "ls" that you want the "-u" string to be seen as a file name and not interpreted as an argument, you can use "ls -- -u"
Had you not known about the "--" argument, or if you were using an older operating system where "--" was found to not be meaningful to "ls", then you could achieve the same outcome by using "ls ./-u" where "." is a universal abbreviation for your current directory.
HTH