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:to:from:subject:date:message-id:mime-version :content-type:content-transfer-encoding; q=dns; s=default; b=W73 ikFDvNKnWXFlilUhvwnNoENTCCod0uVxyWK5lS4pKmDY1fsc97kBtKaJAvoLywuB nw/FQzXp3zdWs+druM2B6eRnMQy5+d2QRPsh6pwcGRKt5WD8N/CIj5XpaxHNToUf 9lR8s+GE0iZj7bfeqS8gJtHst9C93KfrKJkRQK80= 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:to:from:subject:date:message-id:mime-version :content-type:content-transfer-encoding; s=default; bh=sIuM8188J u7UefZ13ILwsF41pQ4=; b=gPGauM7kf+Og4tcuMq7Zyk4sxTf1QG0xc6IohqEzP KCkq919Tg+yGe2DTKwjIciNUAGIo6qB7TjugcXTzXroV6xqmSN7hPNRyJ3OzmWpP u+1kMeGt7Ee2JzvTjrkFShyQKU3kGEI/kYBN6C/XGOkO/GqJMJoyh7KDuN6/6REq XM= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , 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=1.0 required=5.0 tests=BAYES_40,KAM_LAZY_DOMAIN_SECURITY autolearn=no version=3.3.2 spammy=H*UA:3.0.4, H*u:3.0.4, H*r:Unknown X-HELO: blaine.gmane.org To: cygwin AT cygwin DOT com From: Thorsten Kampe Subject: /dev/stderr problem Date: Mon, 17 Oct 2016 08:25:13 +0200 Lines: 30 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit User-Agent: MicroPlanet-Gravity/3.0.4 X-IsSubscribed: yes Hi, the following bash script results in a different output when redirected to a file. ``` printf "FIRST LINE\n" > /dev/stderr shopt -os xtrace printf "SECOMD LINE\n" > /dev/stderr ``` ``` $ bash script.sh FIRST LINE + printf 'SECOMD LINE\n' SECOMD LINE ``` ``` $ bash script.sh 2> file && cat file SECOMD LINE ``` When I use `>&2` instead of `> /dev/stderr` the problem does not occur. Since this problem does not occur on Linux but also with Zsh on Cygwin, I think this is a Cygwin issue. Thorsten -- 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