userland.run70Try the demo
Catalog app · RISC-V VM

Run hck in the browser

A cut replacement that splits on regex delimiters and can reorder fields.

Try it live

Nothing is downloaded until you press Run.

catalog app

Reorder CSV columns

Installs hck 0.11.6 from the signed catalog (every chunk is verified before it is written), then runs the commands below in the VM's shell.

bash
hck --version
hck -d, -D, -f3,1 data.csv
loading…
Expected output
$ hck --version
hck git:v0.11.6-modified
$ hck -d, -D, -f3,1 data.csv
lang,id
rust,1
go,2

What it is

hck selects columns like cut, but its delimiter can be a regex (whitespace by default), fields can be selected by header name, and they come out in the order you list them. In the browser it is a fast column extractor for CSV and log data in client-side pipelines.

Package facts

version
0.11.6
runs on
RISC-V VM (elf-app, riscv64gc-linux-musl)
download
1.2 MB compressed · 1 file
command
hck
requires
nothing else — a static binary
license
Unlicense OR MIT (upstream)
upstream
github.com/sstadick/hck
categories
Data, Text
catalog
generation 12, Ed25519-signed

Install and run it from your page

With the SDK, installApp resolves hck in the signed index, fetches its content-addressed chunks from the CDN, verifies each one and writes the files into the VM. Details in Installing catalog apps.

javascript
import { createNano } from "@userland-run/nano-sdk";

const nano = await createNano({ image: { wasm: "/nano/console.wasm" }, ramMB: 512 });
await nano.installApp("hck"); // signature-verified, cached in OPFS

const r = await nano.shExec("hck --version");
console.log(r.stdout);

Typical usage of the upstream command-line tool:

bash
hck -d, -D, -f3,1 data.csv

← All 32 catalog apps