ral — examples
  1. helloGreet each argument, defaulting to "world".
  2. dedupPrint stdin lines unique, preserving first-seen order.
  3. rename-extensionRename every *.FROM in a directory to *.TO.
  4. find-largeList the 10 largest files under a directory, biggest first.
  5. du-by-extSum file sizes under a directory, grouped by extension; biggest total first.
  6. kv-to-jsonParse a key=value config file, emit JSON to stdout.
  7. csv-summaryGroup a CSV by one column, average a numeric column.
  8. atomic-updateBump a counter in a JSON state file and append a timestamp.
  9. hash-treeHash every file under a directory in parallel, as a sorted manifest.
  10. fanout-fetchFetch a list of URLs in parallel into a directory.
  11. tail-multiMultiplex tail -f across several logs, prefixing each line with its source.
  12. safe-evalRun some operations inside a best-effort sandbox.
  13. backup-rotateKeep the N newest backups in a directory; delete the rest.
  14. batch-numberRename files in a directory to a zero-padded numeric sequence.
  15. bump-versionIncrement the patch component of a semver VERSION file, in place.
  16. calcEvaluate a simple integer arithmetic expression given as arguments.
  17. changed-filesList files changed on the current branch versus a base branch.
  18. checksum-verifyVerify files against a sha256sums-format manifest, resolving names relative to the manifest; report OK/FAILED per file.
  19. clean-emptiesDelete zero-byte files under a directory, skipping dotted entries; report each removal, then the folders that were touched.
  20. column-statsPrint mean, median (middle value), min and max of a named CSV column.
  21. common-linesPrint lines present in both files.
  22. config-defaultsLoad a partial JSON config, reject unknown keys, fill the rest from defaults.
  23. copy-if-newerCopy a source file to a destination only if the source is newer, and say which.
  24. count-by-typeCount files grouped by extension under a tree, biggest group first.
  25. count-matchesCount lines matching a pattern in each file, skipping files with none.
  26. csv-filterKeep the CSV rows whose named column exceeds a threshold.
  27. csv-selectProject the named CSV columns, in the order requested.
  28. csv-sortSort a CSV by a numeric column (given by column number), descending.
  29. csv-to-jsonTurn a CSV with a header row into a JSON array of objects.
  30. csv-to-tsvConvert a CSV file to TSV, columns in header-name order.
  31. diff-countReport how many lines were added vs removed between two files.
  32. dir-diffReport files added, removed, and changed between two directory trees.
  33. disk-alertReport filesystems whose usage exceeds a threshold percent.
  34. dos2unixStrip carriage returns from the named files, rewriting each in place.
  35. env-to-jsonEmit selected environment variables as a JSON object: env-to-json HOME USER
  36. extract-emailsPull every distinct email address out of a text file.
  37. field-cutExtract columns (1-based) from a delimited file, in the given order.
  38. file-ageReport the age in days of every file in a directory.
  39. find-duplicatesGroup files with identical content (by sha256) and print duplicate sets.
  40. find-empty-dirsList directories that contain no files anywhere beneath them.
  41. flatten-dirCopy every nested file into one flat output dir, numbering basename clashes.
  42. frequencyCount how often each distinct stdin line occurs, most frequent first.
  43. git-authorsCount commits per author in a git repository.
  44. git-branch-cleanList local branches already merged into main (candidates to delete).
  45. grep-contextPrint N lines of context around each match of a pattern in a file.
  46. histogramDraw an ASCII bar chart from a file of "category count" lines.
  47. http-statusReport the HTTP status code for each URL, concurrently, then tally by class.
  48. join-csvInner-join two CSVs on a shared key column (given by number).
  49. json-array-filterKeep JSON array elements whose field equals a value: filter users.json role admin
  50. json-getExtract a nested JSON field by dotted path: json-get config.json db.host
  51. json-keysList the top-level keys of each JSON file, and the keys it lacks relative to the others.
  52. json-pluckProject one field from every object in a JSON array: json-pluck users.json email
  53. json-validateValidate a JSON file and canonicalise it to stdout (sorted keys).
  54. largest-dirsTop N immediate subdirectories by total size, largest first.
  55. loc-by-extCount non-blank lines of code grouped by extension, biggest first.
  56. mac-memory-reapReap named memory hogs on macOS and report what the reap recovered.
  57. mac-memory-vitalsA memory and load vitals reading for macOS.
  58. mirror-extCopy every *.EXT under a source tree into a flat destination directory.
  59. mock-commandTest a deploy offline by shadowing curl with a mock function.
  60. ndjson-filterKeep JSONL records whose field equals a value: ndjson-filter.sh users.jsonl role admin
  61. newest-filePrint the most recently modified file under a directory tree.
  62. parallel-mapGzip every given file, four workers at a time.
  63. path-dedupDeduplicate PATH, keeping the first occurrence of each directory.
  64. ping-sweepPing a list of hosts in parallel and report which are up.
  65. pivotCross-tabulate a CSV: sum a value column over each (row key, column key) pair.
  66. poll-until-jsonPoll a JSON endpoint until a field reaches the target value.
  67. prune-oldDelete files older than N days under a directory, reporting each.
  68. query-stringParse a URL query string into decoded key=value lines.
  69. race-mirrorsFetch a file from whichever mirror responds first.
  70. random-passwordGenerate a random password of the requested length.
  71. redact-secretsMask token=/password=/secret= values in a log stream, keeping the key.
  72. retry-untilFetch a URL, retrying up to five times with a pause between attempts.
  73. sandbox-net-offResolve a build's dependencies with the network denied, falling back to the vendored lockfile.
  74. self-locatePrint the absolute path of a sibling file, regardless of where we're run.
  75. slugifySlugify every title in a file; report slugs claimed by more than one title.
  76. split-fileSplit a text file into chunks of N lines each, naming the chunks written.
  77. strip-commentsPrint a config file with blank lines and full-line # comments removed.
  78. table-formatPrint the named columns of a CSV file as an aligned table.
  79. template-fillFill ${VAR} placeholders in a template file from the environment.
  80. timeout-runRun a project's test harness under a wall-clock deadline.
  81. todo-scanReport TODO/FIXME markers under a tree as file:line: text.
  82. top-nPrint the N CSV rows with the largest value in a named column.
  83. touch-treeCreate a directory/file skeleton from a manifest of relative paths.
  84. trim-linesStrip leading and trailing whitespace from every line of a file.
  85. unique-to-firstPrint lines in the first file that are absent from the second.
  86. wait-for-portWait for a TCP port to accept connections, giving up after a deadline.
  87. watch-buildsRun make in several directories at once, waiting for all to finish.
  88. word-freqPrint the top N most frequent words in a text file, most frequent first.
  89. wrap-columnHard-wrap lines longer than WIDTH at word boundaries.

90 of 90 examples

helloGreet each argument, defaulting to "world".

Footgun: in bash the loop for name in $@ word-splits "carol smith" into two names unless every expansion is quoted just so. Here $ARGS is a list of String values, never a re-lexed token soup, so a name with spaces cannot fracture.

hello.sh — bash
set -euo pipefail

if [ "$#" -eq 0 ]; then
    set -- world
fi

for name in "$@"; do
    echo "hello, $name"
done
hello.ral — ral
let names = if !{is-empty $ARGS} {
    return [world]
} else {
    return $ARGS
}

for $names { |n| echo "hello, $n" }