On 8/27/2016 12:15 PM, Andrey Repin wrote: > Greetings, Gene Pavlovsky! > >> Looks like it's related to a recent change in bash, which is `read` >> now honors Cygwin-specific `igncr` shell option (`set -o igncr`), >> which I didn't enable. >> Adding `set -o igncr` to the top of the script does the job, however >> I'd like to know how many more scripts are potentially malfunctioning >> now? >> It's lucky that one sent e-mails on errors, some others might just >> break silently. >> Is it advisable to add `set -o igncr` to /etc/profile or SHELLOPTS? I >> didn't use that feature before and am worried about some other >> negative side effects. > > It is advisable to not have CR's in your scripts to begin with. >
I thought this was about the data the script was reading and not the script itself. Data can have \r regardless of where in the data it exists. That said relying on defaults for a process has been taboo since the dawn of computing. Often defaults change on a whim, they are bicycle shed colors, a maintainer may prefer blue instead of red in any given release. If your script requires a specific mode for the shell to process data properly then be sure to set it before reading the data. -- cyg Simple -- 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