Skip to content

Latest commit

 

History

History
43 lines (31 loc) · 1.37 KB

example4.md

File metadata and controls

43 lines (31 loc) · 1.37 KB

Super Power 4: Joining Output from Jobs

You can also pipe the output of a Cloud job to a local pipeline.




Example

To generate a histogram of the CPU models running in your Cloud, note how we can do part of the computation in the Cloud, and then use a local pipeline to assemble the results:

super run -p3 -- `lscpu | grep "Model name" | cut -f2 -d ":"' | sort | uniq -c

Another Example

Super auto-scales normal UNIX command lines

Following on from our previous cp example, this super run, this pipeline uses wc -l to generate partial sum in the Cloud, and then uses a local awk to sum the partial sums generated by the 3 jobs.

super run -- \
  'cat /s3/ibm/tmp/*.gz | gunzip -c - | grep "WARC-Type: conversion" | wc -l' \
  | awk '{N+=$1} END {print N}'
122272

Other Super Powers