This simple command fails in bash:

echo "print 'tsql'" | sqlcmd -E

it works correctly in a regular old command prompt.

It used to work with previous versions of cygwin. I've also tried inserting various flavors of unix2dos in there, and I've looked at the output with "od -c". So I'm quite sure it's not just a LF vs. CR/LF problem.

Looking at this thread: http://cygwin.com/ml/cygwin/2010-01/msg00205.html

leads me to believe something got broken in cygwin, but I've been unable to chase down any more leads.

Does anyone have any clues, other than generating a temp file, and then using

sqlcmd -E -i tempfile

which does work, but it's ugly.

link|improve this question
try swapping quotes: echo 'print "tsql"' | sqlcmd -E – jftuga May 9 '11 at 15:11
1) it's not a quoting problem, 2) your solution isn't valid TSQL, even if it was a quoting problem – Eric H. May 9 '11 at 18:18
feedback

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
or
required, but never shown

Browse other questions tagged or ask your own question.