Sponsored Content
Top Forums Shell Programming and Scripting Parsing and Editing a json file with bash script Post 302971459 by RudiC on Wednesday 20th of April 2016 11:13:15 AM
Old 04-20-2016
Some more/refined details, please! I guess you don't want to modify based on "name" (the constant string), but on name's value, i.e. "a", "b", or "c", and all of this just in the "appMap" section?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Conversion of bash parsing script to perl?

I need help with a perl parsing script. I have some error logs on a windows machine that I need to parse from a text file, but I know nothing about perl. I usually run this bash script on my linux box and it does just what I need. How would I do the same thing with perl and port it to my windows... (2 Replies)
Discussion started by: cstovall
2 Replies

2. Web Development

bash script editing my apache config files

okay i'm going to try to say this uber-simple: I use dropbox (file-sync service). in order for dropbox sync files, they must be its children eg. somewhere under /home/jzacsh/Dropbox]. I want to now use it to keep my development files in sync across my machines: easy: just move my dev. files... (2 Replies)
Discussion started by: jzacsh
2 Replies

3. Shell Programming and Scripting

Help parsing filename with bash script

Hi all! Looking for some help parsing filenames in bash. I have a directory full of files named "livingroom-110111105637.avi". The format is always date and time (yymmddhhmmss). I'm looking to parse the filenames so they are a little more easily readable. Maybe rename them to... (4 Replies)
Discussion started by: mtehonica
4 Replies

4. Shell Programming and Scripting

Problems editing file with awk in bash script

Hello dear users, here I have a script to manipulate .csv files that are like this originally: And I need to make a script to delete certain fields. Each field is separated with a comma. So, here is my script (at least a part of it): Field $1 is composed of a name, and then a... (5 Replies)
Discussion started by: sr00t
5 Replies

5. Shell Programming and Scripting

Column parsing in a bash script - HELP

I would like to setup a script that pulls in time/date in two seperate columns, and then name the other columns as listed below: Column1=Art/TJ output Column2=Art/TJ output Column3=TJ output column4=Art output Column5=If time/date past 12:00 noon -fail Colume6=If time/date before... (1 Reply)
Discussion started by: walnutpony123
1 Replies

6. Shell Programming and Scripting

How to define a variable in a BASH script by using a JSON file online?

Hello, I would like to modify an existing script of mine that uses a manually defined "MCVERSION" variable and make it define that variable instead based on this JSON file stored online: https://s3.amazonaws.com/Minecraft.Download/versions/versions.json Within that JSON, I 'm looking for... (4 Replies)
Discussion started by: nbsparks
4 Replies

7. Shell Programming and Scripting

Bash script not parsing file with spaces in path

Hi everyone, I'm trying to write my first ever shell script, the OS is Raspbian. The code I have written must be executed whenever a certain database has been modified. The database resides on a Windows server to which I have a mount point, and I have no control over the Windows server at all so... (2 Replies)
Discussion started by: gjws
2 Replies

8. Shell Programming and Scripting

Bash script - cygwin (powershell?) pull from GitHub API Parse JSON

All, Have a weird issue where i need to generate a report from GitHub monthly detailing user accounts and the last time they logged in. I'm using a windows box to do this (work issued) and would like to know if anyone has any experience scripting for GitAPI using windows / cygwin / powershell?... (9 Replies)
Discussion started by: ChocoTaco
9 Replies

9. Shell Programming and Scripting

JSON structure to table form in awk, bash

Hello guys, I want to parse a JSON file in order to get the data in a table form. My JSON file is like this: { "document":{ "page": }, { "column": } ] }, { ... (6 Replies)
Discussion started by: Gescad
6 Replies

10. Shell Programming and Scripting

Building JSON command with bash script

Hello. I'm new to bash script and I'm learning the basics by writing some scripts. Recently a friend of mine asked me if I could try to write a script to him to automate a couple of processes that uses JSON RPCs. I'll try to explain in few words the workflow just to contextualize the problem.... (48 Replies)
Discussion started by: psysc0rpi0n
48 Replies
targetctl(8)						      System Manager's Manual						      targetctl(8)

NAME
targetctl - Save and restore configuration of kernel target DESCRIPTION
targetctl is a low-level script to save and restore the configuration of the LIO kernel target, to and from a file in json format. It is not normally meant to be used by end-users directly, but by system init frameworks, or advanced end-users who are generating the configura- tion file themselves and need a way to load the configuration without relying on the targetcli configuration shell. USAGE
targetctl must be invoked as root. Exit status will be 0 if successful, or nonzero if an error was encountered. targetctl save [config-file] Saves the current configuration of the kernel target to a file in json format. Since the file may contain cleartext passwords, the file's permissions will be set to only allow root access. If config-file is not supplied, targetctl will use the default file location, /etc/tar- get/saveconfig.json. targetctl restore [config-file] Removes any existing configuration and replaces it with the configuration described in the file. See saveconfig.json(5) for more details. If parts of the configuration could not be restored, those parts will be noted in the error output, and the rest of the configuration will still be applied. targetctl clear Removes any existing configuration from the running kernel target. targetctl --help Displays usage information. SEE ALSO
targetcli(8), targetd(8), saveconfig.json(5) FILES
/etc/target/saveconfig.json /sys/kernel/config/target AUTHOR
Written by Andy Grover <agrover@redhat.com>. Man page written by Andy Grover <agrover@redhat.com>. REPORTING BUGS
Report bugs via <targetcli-fb-devel@lists.fedorahosted.org> or <https://github.com/agrover/rtslib-fb/issues> targetctl(8)
All times are GMT -4. The time now is 09:41 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy