bash - Does the the order of command line flags matter? -
this question has answer here:
i testing hugo static blog generator comes themes , example sites within them.
in order use examplesite, copy content it's content hugo project root. while did this, noticed where, put -flag args seems important.
is normal bash behavior or introduced zsh?
this command didn't work
cp themes/hugo-theme-bootstrap4-blog/examplesite/* . -r
this command worked!
cp -r themes/hugo-theme-bootstrap4-blog/examplesite/* .
cp
own command, provided os vendor. neither bash nor zsh controls behavior of cp
.
the posix standard requires cp
accept options before arguments. given in posix utility syntax guidelines, entry #9:
- all options should precede operands on command line.
gnu tools go beyond requirement, accepting options after arguments unless --
given prior (as described in guideline #10).
Comments
Post a Comment