2

Possible Duplicate:
What does “--” (double-dash) mean?
Single dashes - for single-character options, but double dashes -- for words?

I was reading the man zip page and I found this examples:

[...] using the command

unzip -p backup | tar xf -

When [...] For example,

tar cf - . | zip | dd of=/dev/nrst0 obs=16k

is equivalent to

tar cf - . | zip - - | dd of=/dev/nrst0 obs=16k

I' like know the minus utility of these cases. Why two minus signs are written in the third case?

omar
  • 335
  • 1
  • 4
  • 8
  • See: http://unix.stackexchange.com/questions/21852/single-dashes-for-single-character-options-but-double-dashes-for-words – jasonwryan Nov 10 '11 at 00:00
  • 1
    @jasonwryan That one doesn't seem related. This looks like a combination of [Usage of dash (-) in place of a filename](http://unix.stackexchange.com/questions/16357/usage-of-dash-in-place-of-a-filename) and [What does "--" (double-dash) mean?](http://unix.stackexchange.com/questions/11376/what-does-double-dash-mean) though; I think I'm going with the latter since that's the actual question at the end – Michael Mrozek Nov 10 '11 at 00:07
  • Thanks both @jasonwryan and Michael. I found Michael's answer helpful – omar Nov 10 '11 at 00:30
  • 2
    There's no `--` in this question. It`s `- -`, meaning create the ZIP file on standard output, and read the data to compress from standard input. So I'm pretty sure it's http://unix.stackexchange.com/questions/16357/usage-of-dash-in-place-of-a-filename. – Mikel Jun 25 '12 at 17:14

0 Answers0