All languages

Groovy

You're viewing a free preview. Sign in free to read every script.

Why this exists Groovy is often used as a glue language: read a file, run a command, decide what to do with the result. Groovy makes both jobs far shorter than Java, but running external commands has one real trap (a…

Read Files and Run Shell Commands from Groovy

A standalone Groovy script that counts errors in a log file, writes a small report, and runs an operating-system command while capturing its exit code, stdout and stderr separately.

Sign in free to read this script, along with the rest of the library.

Sign in free