Quantcast
Channel: @command -v gpg why is the version flag before the command? - Ask Ubuntu
Viewing all articles
Browse latest Browse all 2

Answer by Ravexina for @command -v gpg why is the version flag before the command?

$
0
0

The -v is an argument for command builtin not for the gpg, it's not looking for "gpg" version, it's looking to see if any command named "gpg" exist.

From help command:

-v    print a description of COMMAND similar to the `type' builtin

it's similar to type builtin:

$ command -v gpg
/usr/bin/gpg

If it wasn't able to find the command, it'll return a non-zero exit status, so the "OR" section will be run:

|| { ... }

which will prints out:

Cound not find gpg. Aborting.

with an exit status code of "1".


Viewing all articles
Browse latest Browse all 2

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>