public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* dd garbled output
@ 2014-05-11  7:17 Steven Penny
  2014-05-11 17:35 ` Thomas Wolff
  0 siblings, 1 reply; 2+ messages in thread
From: Steven Penny @ 2014-05-11  7:17 UTC (permalink / raw)
  To: cygwin

Using this file

    $ cat file.txt
    hello
    doge
    world

I can run this command

    $ grep -v doge file.txt | dd conv=notrunc of=file.txt

and get output as expected

    $ cat file.txt
    hello
    world

However with Cygwin the end result is garbled

    $ cat infile.txt
    hello
    world
    orld

What is causing this?

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: dd garbled output
  2014-05-11  7:17 dd garbled output Steven Penny
@ 2014-05-11 17:35 ` Thomas Wolff
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Wolff @ 2014-05-11 17:35 UTC (permalink / raw)
  To: cygwin


Am 11.05.2014 09:17, schrieb Steven Penny:
> Using this file
>
>      $ cat file.txt
>      hello
>      doge
>      world
>
> I can run this command
>
>      $ grep -v doge file.txt | dd conv=notrunc of=file.txt
>
> and get output as expected
>
>      $ cat file.txt
>      hello
>      world
>
> However with Cygwin the end result is garbled
No, it's not.
>      $ cat infile.txt
>      hello
>      world
>      orld
>
> What is causing this?
Obviously, you had some content in file.txt before and *as you 
requested* (conv=notrunc, read the manual) dd did not overwrite that but 
only filled in its output at the beginning of the file.


---
Diese E-Mail ist frei von Viren und Malware, denn der avast! Antivirus Schutz ist aktiv.
http://www.avast.com


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-05-11 17:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-11  7:17 dd garbled output Steven Penny
2014-05-11 17:35 ` Thomas Wolff

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).