Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Mike Amling Newsgroups: comp.lang.java.programmer Subject: Re: Bash script not working as commandline MySQL JDBC Date: Sun, 17 Nov 2013 16:09:29 -0600 Lines: 15 Message-ID: References: <7f1a4290-6ce6-4673-a411-62dbb326ef99@googlegroups.com> <7a51917c-ccd4-4293-abf7-4d42dce215b5@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net kdbPVxMCm2PtL5skTYuwNgm6yVqqKhR5bUmwwe0XdIMpw9dKuD Cancel-Lock: sha1:DMJ3dUaMUHaLxPgtiWy1M0X39jk= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 In-Reply-To: <7a51917c-ccd4-4293-abf7-4d42dce215b5@googlegroups.com> Xref: csiph.com comp.lang.java.programmer:26532 On 11/17/13 2:38 PM, RVic wrote: > Gentleman, > > Thank each of you for your help. I got it solved by simply putting a semicolon at the end of the lone statement in the script! I've seen something very similar when using Cygwin. The editor, vim, knew it was running on Windows and provided a line ending of CRLF. Cygwin read the script and treated the CR as part of the last word on the command line. Putting a semicolon at the end protected the command's last word from being unintentionally extended. Mike Amling -- Just when we secure for ourselves the benefits of the rule of law, Murphy shows up.