jc Verified current stable Not installed? Networking

Jc / Convert Command Output To Json Via Magic Syntax

Convert Command Output To Json Via Magic Syntax

Quickly convert the output of the ifconfig command to JSON format using jc for easier parsing.

$
Terminal
jc <ifconfig>

When To Use

Quickly convert network configuration outputs to JSON format.

Command Builder

Tune the command before you copy it

Back to syntax
$
Generated Command
jc <ifconfig>

Terminal Output

Expected runtime feedback

Simulated preview
>
Output
{
  "eth0": {
    "inet": "192.168.1.10",
    "netmask": "255.255.255.0"
  }
}

Command Breakdown

What each part is doing

jc
Base Command
The executable that performs this operation. Here it runs Jc before the shell applies any redirect operators.
<ifconfig>
ifconfig
The value supplied for ifconfig.

How To Run

Execution path

  1. Step 1

    Run the command `ifconfig` to get network configuration.

  2. Step 2

    Pipe the output to `jc` like this: `jc ifconfig`.

  3. Step 3

    View the JSON formatted output in the terminal.

Alternative Approaches

Comparable commands in other tools

Alternative networking tools for the same job.