delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2014/05/11/13:35:48

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:message-id:date:from:mime-version:to:subject
:references:in-reply-to:content-type:content-transfer-encoding;
q=dns; s=default; b=NGqAftoyJ9f9Cd+Ydf8R6g40j3OJP7vXfx/tlEHOjbb
0GVT9YviBR/8zWSkfvXjgblY4Q+63WHmqAl47tV3yGgwLNzP17ytu8snqmoIVaAq
LxjZoGUPlPs3I+WPRfsSsXI2uJrmknL8lpIZFD9oQ+U0LycGh41GAn8POoU8UwXA
=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:message-id:date:from:mime-version:to:subject
:references:in-reply-to:content-type:content-transfer-encoding;
s=default; bh=40qpr3ZyRPVcoKwXzc4mY5x4ddA=; b=mmfaSCO6BXmtDI/w7
YRlRKegZ3hvUfQG9ByJCwII0NJ0LvA188vQN/vBzF6Cw8MpCUPcdJ1x6STD2RVQh
mMbJjuo0dfs47zVYnly5fdmctR4i1hf74Neszj7VkBYUi+N4aHTzbIKgWotgq+21
QIlKa/wmHs/lBwgnTNi8TpaQwg=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=3.2 required=5.0 tests=AWL,BAYES_50,FOREIGN_BODY,RCVD_IN_DNSWL_NONE autolearn=no version=3.3.2
X-HELO: mout.kundenserver.de
Message-ID: <536FB4DA.3080304@towo.net>
Date: Sun, 11 May 2014 19:35:22 +0200
From: Thomas Wolff <towo AT towo DOT net>
User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:24.0) Gecko/20100101 Thunderbird/24.5.0
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: dd garbled output
References: <CAAXzdLWOYqV1qvWtdovrLn5OYWHvgtyoc9Gyy2f2XSnAL_kyVQ AT mail DOT gmail DOT com>
In-Reply-To: <CAAXzdLWOYqV1qvWtdovrLn5OYWHvgtyoc9Gyy2f2XSnAL_kyVQ@mail.gmail.com>
X-TagToolbar-Keys: D20140511193522464
X-IsSubscribed: yes

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019