www.delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-SWARE-Spam-Status: | No, hits=-3.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_PASS,UNPARSEABLE_RELAY |
X-Spam-Check-By: | sourceware.org |
To: | cygwin AT cygwin DOT com |
From: | Eric Blake <ebb9 AT byu DOT net> |
Subject: | Re: date generates a "\r" |
Date: | Tue, 3 Feb 2009 17:16:23 +0000 (UTC) |
Lines: | 23 |
Message-ID: | <loom.20090203T171313-125@post.gmane.org> |
References: | <announce DOT 498855A5 DOT 8080102 AT byu DOT net> <0A4ADB2148EA2948B9FFFB980FA0D22F0570B7B6 AT djexchange DOT dickey-john DOT com> |
Mime-Version: | 1.0 |
User-Agent: | Loom/3.14 (http://gmane.org/) |
X-IsSubscribed: | yes |
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 |
Arun Biyani <abiyani <at> dickey-john.com> writes: > [log$:513] name=$(date +tiny-%b-%d-%g) > [log$:514] bakup=$name.tz > > The assignments above result in bakup being > "/c/home/bak/tiny-Feb-02-g\r.tz". I'd like to understand why this > happens Please don't commandeer threads. The answer to your question is here: http://cygwin.com/ml/cygwin-announce/2008-11/msg00035.html not to mention that it is a FAQ on this list > when the script is being run from cron (but not when I run it in a bash > shell). Is the fix is to put "/usr/bin/date" instead of "date"? No, the fix is to quit using linefeeds in your script files unless you are willing to teach bash to ignore those line feeds. d2u is your friend. -- Eric Blake volunteer cygwin bash maintainer -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |