-
Notifications
You must be signed in to change notification settings - Fork 265
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Getting "EXPECTED value GOT EOF" for any kind of JSON in Cygwin #33
Comments
\ does not work as an escape in bash as you think it would. try |
Thanks for the quick reply. I'm pretty sure now it's a CRLF problem, because today I used JSON.sh on a Linux machine with the same request I first tried on my Windows machine with Cygwin and it worked fine. To reproduce: I didn't install Cygwin, instead I use the free portable version of MobaXterm, an SSH client on steroids. Right after launching you're in a Cygwin terminal. Then:
Update: |
can you run the tests? which of the tests fail? awk/grep could be the problem. Possibly, we could change those bits to use options that are more widely supported. You could debug this by adding. do the parts work? do |
Tests:
By adding what? Or do you mean what you said afterwards?
Didn't produce any output. |
right okay. It looks like you don't have a compatible egrep or awk egrep. see this function here: which picks a suitable grep from what might exist.... what happens if you change to otherwise, what grep do you have? |
I ment to say "... adding logging to the various stages" but it looks like we have found a lead now, since tokenize is not outputting anything. |
I replaced
Still no output. In both if-statements the condition is true (checked with
As I'm using MobaXterm and not Cygwin directly, I thought maybe that might be an issue, but I just installed Cygwin 1.7.35 and tried out tokenize, with the same results (no output). The real Cygwin installation seems to use |
do you have the |
there is something inside |
I'm using JSON.sh in a Cygwin environment and I'm getting an error when trying to use it for any kind of JSON:
curl registry.npmjs.org/express | ./JSON.sh | egrep '\["versions","[^"]*"\]'
echo "{\"foo\":\"bar\"}" | ./JSON.sh
Maybe related to #26? Or maybe related to CRLF vs. LF on Windows vs. Linux (note I'm using Cygwin on Windows)?
The text was updated successfully, but these errors were encountered: