public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Illegal character ^M
@ 2011-11-29 20:16 frenco
  2011-11-29 21:41 ` Tim McDaniel
  2011-12-03  7:32 ` Erwin Waterlander
  0 siblings, 2 replies; 3+ messages in thread
From: frenco @ 2011-11-29 20:16 UTC (permalink / raw)
  To: cygwin


I have a problem with a character. I think it's a conversion problem between
dos and unix.

I have a variable that is a float value.
When I print it with the echo command i get:
0.495959
But when I try to make an operation on that value with the bc command (I am
not sure how to write the bc command).
echo $mean *1000 |bc

 I get:
(standard_in) 1 : illegal character: ^M

I already use the dos2unix command on my .sh file.
I think it's because my variable have the ^M character (not printed with the
echo command)

How can i eliminate this error?

I already try a lot of things but I am really lost.

Any thought?
-- 
View this message in context: http://old.nabble.com/Illegal-character-%5EM-tp32881791p32881791.html
Sent from the Cygwin list mailing list archive at Nabble.com.


--
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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-12-03  7:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-29 20:16 Illegal character ^M frenco
2011-11-29 21:41 ` Tim McDaniel
2011-12-03  7:32 ` Erwin Waterlander

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).