LinuxCommandLibrary

bun-c

Run a shell command string through Bun

TLDR

Run a shell command

$ bun -c "[shell command]"
copy
Run with environment from .env
$ bun -c "[command]" --env-file [.env]
copy

SYNOPSIS

bun -c command

DESCRIPTION

bun -c runs a shell command string, similar to sh -c but using Bun's built-in shell implementation. It can load environment variables from .env files before executing the command, making it useful for running scripts that depend on environment configuration without additional tooling.

SEE ALSO

bun(1), bun-run(1), bun-x(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community