On Sun, Sep 27, 2015 at 12:29 PM, Kwan Fong <[email protected]> wrote:
> Hi,
> For lack of an ''xxd'' mailing list I will report a mistake in one of the 
> manpage examples, under the CAVEAT section, here.
>
> The following is an excerpt from the CAVEAT section:
>
>     The following examples may help to clarify (or further confuse!)...
>     Hexdump from file position 0x480 (=1024+128) onwards.  The `+' sign means 
> "relative to the current position", thus the `128' adds to the 1k where dd 
> left off.
>     % sh -c "dd of=plain_snippet bs=1k count=1; xxd -s +128 > hex_snippet" < 
> file
>
> ''dd'' reads stdin.  xxd's stdin is connected to "file", so it is entirely 
> unaware of whether ''dd'' reads it all or not.
>
> The case/scenario intended can be illustrated w/o the redirection ("< file").
>
> Cheers,
> Kwan Fong (klf)

Actually, the < file redirection is outside the quotes, so it applies
to sh, not to dd or xxd. The sh shell passes its stdin to the
successive programs of the list, i.e. first to dd, then to xxd in the
state in which it was left by dd.


Best regards,
Tony.

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui