LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-15-2019, 06:32 PM   #1
leetbacoon
LQ Newbie
 
Registered: Jul 2019
Posts: 1

Rep: Reputation: Disabled
Question Read/Write/Modify JSON File via bash command line?


Hi everyone, long time forum lurker, just joined today.

I am actually using a Mac (macOS High Sierra 10.13.6), however I am sure that any help here will still be usable since it always has been in the past

Anyway, I have a hierarchical database I created using a .json file, which all looks wonderful and all, however I need to be able to read, write and modify the content inside that .json file. I don't know that much about databases and the like, but doesn't SQL allow that pretty seamlessly?

I did try writing the content in my .json file in a SQL database, however this was pretty much impossible for me, since the database I have contains a lot of children and siblings and it just didn't turn out that great.

I'm wondering if there are any CLI tools that make this possible. I'm using bash 3.2.57(1)-release for the record and I've already got brew installed.

Thanks!
 
Old 07-15-2019, 06:35 PM   #2
individual
Member
 
Registered: Jul 2018
Posts: 232

Rep: Reputation: 175Reputation: 175
Take a look at jq.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to remove particular value in json file via linux command satyarankireddy Linux - Newbie 20 03-31-2019 10:53 AM
How to remove object in json file via linux command satyarankireddy Linux - Server 1 03-24-2019 08:33 PM
LXer: How to parse JSON string via command line on Linux LXer Syndicated Linux News 0 09-05-2013 06:32 PM
[SOLVED] [bash] read file, modify, write - possible without tmpfile? hashbang#! Programming 2 02-11-2010 05:27 AM
linux scripting help needed read from file line by line exc commands each line read atokad Programming 4 12-26-2003 10:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:21 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration