knowdotnet
knowdotnet

Reputation: 925

How to process json in bash script in windows environment

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?

Upvotes: 2

Views: 4552

Answers (1)

Manish R
Manish R

Reputation: 2392

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?

Upvotes: 1

Related Questions