I am writing bash script that is supposed to work both on linux and windows environment. To enable bash on windows we have installed cygwin. Seems jq lib can handle json but not sure will it work on windows environment too? Same with sed not sure how to enable it in windows environment? Some other libraries?
Asked
Active
Viewed 3,778 times
2
-
1Have you tried running `sed` or `jq` inside cygwin ? Try copy/pasting your commands from one environment to the other and see if they work (Hint : they should) – Aserre Oct 11 '18 at 13:55
-
no jq has not worked. I checked my cygwin64\bin folder and did not found any jq exe program. https://stedolan.github.io/jq/download/ downloaded and put in exe in bin folder. still jq is working from bash prompt – knowdotnet Oct 11 '18 at 15:26
-
1what happens when you type `jq --help` in cygwin ? – Aserre Oct 11 '18 at 15:36
1 Answers
1
I have jq installed on cygwin and it can handle json data in Windows.
You can install jq on Cygwin by two ways
1) Run this in cmd. setup-x86_64.exe is your cygwin installation binary
setup-x86_64.exe -q -P jq
2) Install apt-cyg(the package manager of cygwin similar to yum) and run on cygwin
apt-cyg install jq
NOTE: The details of installing packages on Cygwin is mentioned How do I install cygwin components from the command line?

Manish R
- 2,312
- 17
- 13
-
#3 use setup in graphic mode https://cygwin.com/cygwin-ug-net/setup-net.html#setup-packages – matzeri Oct 11 '18 at 18:44
-
@matzeri, 1st point is already covering your 3rd point. It is actually invoking the installer in quiet mode – Manish R Oct 12 '18 at 05:38