This is the mail archive of the
mailing list for the Cygwin project.
echo -n or sleep 0 needed to unblock Bourne shell script
- From: Matthijs Nescio <matthijs_1971 at hotmail dot com>
- To: "cygwin at cygwin dot com" <cygwin at cygwin dot com>
- Date: Fri, 26 Feb 2016 14:04:22 +0100
- Subject: echo -n or sleep 0 needed to unblock Bourne shell script
- Authentication-results: sourceware.org; auth=none
I have the strangest problem. I am running some complicated advanced Bourne shell scripting. These scripts work fine under Ubuntu 14.04 LTS. However, in Cygwin I have to add some strange commands with no obvious effect; without these the scripts just hang. I can not disclose the scripts completely because they are company property. I realise that this does not comply to the rules of smart questions, but if anybody else has this problem the Cygwinners need to know about it. I do not exactly know when these problems started. I reinstalled Cygwin twice, several weeks ago and yesterday evening.
I have had this problem with several complicated, lengthy scripts. Debugging using echo debug statements is hard because the echo makes the problem go away. When I discovered similar problems in multiple scripts, I reinstalled Cygwin, but the problem persists. Also rebooting my Windows 7 Enterprise edition machine does not solve the problem. I have had some experienced colleagues to look at this and they were as flabbergasted as I was.
TTP_FILE_DR_KML=`echo $TTP_FILE.dr.kml | sed -s 's#\.txt\.#\.#g'`
#echo -n> /dev/null
if [ "`convert_needed "$TTP_FILE_DR_KML"`" = "convert" ]
In the examples above and below, either the sleep or the echo has to be commented in, otherwise the script just hangs. In the example below the doit function needs the echo or sleep, otherwise it does not return.
# 8< code removed
order to investigate this problem the Cywinners will need more information. Feel free to ask, but it may not be legal for me to share.
* Was a similar issue ever reported? I have looked, but did not find anything.
* Is there a solution?
Thank you, kind regards, Matthijs.
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple