Mini Shell

Direktori : /opt/imh-python/bin/
Upload File :
Current File : //opt/imh-python/bin/mdjson3

#!/opt/imh-python/bin/python3.9

import argparse
import json
import sys

import mdstat


if __name__ == '__main__':
    parser = argparse.ArgumentParser()
    parser.add_argument("path", nargs="?", default="/proc/mdstat")
    args = parser.parse_args()

    json.dump(mdstat.parse(args.path), sys.stdout, indent=4)

Zerion Mini Shell 1.0