Skip to content

Instantly share code, notes, and snippets.

@dkelosky
Created April 20, 2022 15:38
Show Gist options
  • Save dkelosky/84eb9611cf87c76098d621d885997fb6 to your computer and use it in GitHub Desktop.
Save dkelosky/84eb9611cf87c76098d621d885997fb6 to your computer and use it in GitHub Desktop.
index.mjs row parsing
import { zowe } from "./zowe.mjs";
const resp = zowe("jobs list jobs --rff jobid jobname status", { silent: true});
const rows = resp.split(/\r?\n/);
rows.forEach((rows) => {
const cols = rows.split(/\s+/);
console.log(`jobid: ${cols[0]} jobname: ${cols[1]} status: ${cols[2]}`);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment